Home > virtualization > Route multiple subdomains on one external ip to multiple internal ips

Route multiple subdomains on one external ip to multiple internal ips

March 27Hits:1

i have several subdomains(git.example.org, build.example.org, etc.), i have a router with an external ip and i have several virtual machines on a host computer with internal ips. Now i want to route git.example.org to internal ip and build.example.org to internal ip How can I do this?

I setup in the Router that all traffic on port 80 is comming to my host computer with internal ip and installed Squid on that computer.

I added the following lines to the squid.conf file:

cache_peer parent 80 0 no-query originserver name=server_1 cache_peer_domain server_1 git.example.org cache_peer parent 80 0 no-query originserver name=server_2 cache_peer_domain server_2 build.example.org 

But this is not working for me. :( Any help appreciated.

Regards Nils

Update: Here is the solution for Apache



Squid isn't exactly the optimum solution for a reverse proxy -- it'll do it with enough prodding, but it's not the tool I would ever use.

For simple proxying needs, I'd use the nginx HttpProxyModule(or Apache's mod_proxy, if your tastes go that way), switching to varnish if caching was a priority. The nice thing about using a webserver is that they're simple, robust, and you probably use them already and hence know a bit about them. Varnish, on the other hand, is a bit more niche, but when you want something that'll cache your content, it really is the duck's nuts.

The thing to remember about all this, though, is that name-based proxy redirection is only for protocols that support indicating the name of the service they're connecting to -- which limits your protocol selection considerably. So, if you're doing anything other than HTTP, you probably want to go talk to your network provider about a few more IPs (despite the fact that we're running out of IPv4 space). It really does make life so much easier.

Related Articles

  • Route multiple subdomains on one external ip to multiple internal ipsMarch 27

    i have several subdomains(git.example.org, build.example.org, etc.), i have a router with an external ip and i have several virtual machines on a host computer with internal ips. Now i want to route git.example.org to internal ip and build.e

  • Should I use multiple subdomains for a website that supports multiple cities?March 30

    So the closest example I can give is craigslist, for example: Craigslist Winnipeg: http://winnipeg.craigslist.ca/ Craigslist Toronto: http://toronto.craigslist.ca/ Is copying this style going to hurt me a lot SEO wise? Does it make more sense to have

  • Multiple Subdomains on one IP address

    Multiple Subdomains on one IP addressAugust 29

    Hey complete noob here. I am looking for a way to have multiple subdomains all on 1 ip address with different web roots. I do not know if this is possible or not but I would really like to know. I currently have my DNS at 1and1 for my domain set to m

  • wildcard host name bindings for multiple subdomains in multiple sites on IIS7 with a single IP addressMarch 19

    Situation: I have a single windows 2008 server with a single public IP address. I have multiple domains with wildcard A records pointing to the single IP address. I need each domain to be hosted by a different web site. (i.e. www.domain1.com by site

  • nginx reverse ssl proxy with multiple subdomainsSeptember 13

    I'm trying to locate a high level configuration example for my current situation. We have a wildcard SSL certificate for multiple subdomains which are on several internal IIS servers. site1.example.com (X.X.X.194) -> IISServer01:8081 site2.example.co

  • BingBot hitting multiple subdomains all at the same time, causing panicSeptember 24

    I have a site with multiple subdomains. On certain hours of the day, Bingbots would gather at my site and do a massive scan like this: 01:23:11 a.example.com GET /index HTTP/1.1 200 Bot.A 01:23:11 b.example.com GET /index HTTP/1.1 200 Bot.A 01:23:11

  • Managing IIS log files over multiple subdomainsJuly 30

    I have enabled logging of the site folder which contains the files of multiple subdomains. When I look at the log, i see the cs-uri-stem, which gives me the directory and file accessed. I can't tell if these are all for the primary domain, in which c

  • basic auth across multiple subdomainsMarch 29

    I'm setting up a basic test environment to test drive multiple sites I co-maintain with a colleague. What I am trying to achieve is to password protect the entire domain with basic auth. This is working, but the problem is that for every subomain you

  • Create multiple subdomains for the same directory September 25

    Possible Duplicate: Apache redirect to another domain all URLs, except for ones starting with substring I would like to optimize image loading for my website using multiple subdomains for the static files residing in /files. Is there a good way to ac

  • One WordPress and database but multiple subdomainsDecember 9

    I want to create a multiple subdomains, but using only one wordpress and database installation. The difference of those subdomain sites are the colors and the blogs, but in terms of functionalities, layout, plugins, they are just the same. Is this po

  • SSL on multiple subdomains with the same IPApril 25

    I installed a wildard SSL certificate on our server on which we will run multiple subdomains. So I created sub1.domain.com, sub2.domain.com, etc. I created several vhost files ( etc) and set NameVirtualHost *:443. So far all subdomains are running on

  • Create multiple subdomains for multi-site from a database

    Create multiple subdomains for multi-site from a databaseJune 9

    I want to create multiple subdomains for users. I know how to create multiple subdomains manually using creating network. But, i have so many users, I can't create those subdomains manually one by one. I have a user list in an Excel file: id || usern

  • Access internal host from a subdomain of an external dnsSeptember 11

    This image contains the topology I want to make work. I have a linux server that is used for hosting websites and also routing for our internal network. How can I access the internal server that hosts the team foundation server from outside from a do

  • How to Reconcile External Data and Multiple Values for a List Item?December 11

    I am currently developing a solution that requires me to integrate a SharePoint 2010 list (generic list type) with items from a SQL Server database. In addition to this hypothetical field being surfaced in SharePoint as an External List, I have creat

  • Website's url when tracking multiple subdomains in Google Analytics under one account May 12

    This question already has an answer here: One multi-domain analytics profile, or one analytics profiles per domain? 3 answers Tracking multiple domains and subdomains on one analytics profile 1 answer I would like to track a main domain in Google Ana

  • Same MediaWiki database/files on multiple subdomainsAugust 9

    so I am currently setting up a MediaWiki server (I am still not sure whether I should go for MediaWiki or DokuWiki though), but if I go for MediaWiki - is it possible to setup some kind of multi MediaWiki? Same installation on multiple subdomains. I

  • I have a new Netgear Router with a WD 1T external drive that I cannot seeMay 10

    I have a new Netgear R6200 Router. I have an external drive hooked up to it by the usb port. On my Windows computer I can see the drive and work with the files. On both of my Ubuntu 14.04 computers, I can see the Workgroup network but cannot access t

  • How can I accept responses from an API with multiple subdomains?April 29

    I write website prototypes that use data from a server I do not control, the response is in JSON and the server does not support JSONP, thus I have problems with CORS as I am developing in the client only. I have managed to get around this by running

  • How to setup one virtual host configuration for multiple subdomainsJune 3

    Is it possible to setup one virtual host configuration for multiple subdomains using some sort of pattern matching? What I want to achieve is something like the following: <VirtualHost> ServerName www.([a-z]+).domain.tld DocumentRoot /w

  • SSL wildcard certificate for multiple subdomains / ip's?October 2

    I have multiple subdomains running web servers that I was to put SSL onto. Say they are linux.mydomain.com, windows.mydomain.com and mac.mydomain.com. each is its own vps and has its own IP (and a different OS, but that is by-the-by). The linux.mydom

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.661 s.