2

I want to have multiple servers behind a single firewall and access each with a different subdomain.

Currently, I am having to have each server tied to a different port (which my firewall forwards to the correct server), but it would be very nice to be able to type in a subdomain because it is easier to remember and is cleaner.

Here are my vague ideas of how this could work:

1) some functionality in my firewall/switch that I am unaware of.

2) some type of load balancing software which would serve a different internal IP/port depending on which subdomain was requested.

3) some type of webserver that acted as the central hub that decided which traffic to return based on the subdomain.

4) I don't know much about them, but SRV records seem to offer promise - would they relate to this situation?

5) it seems as though there must be some solution to this - I would really like to avoid having to get a separate external IP address for each one of the servers that I want to access externally!

Any idea of which of these things might work?

1
  • What firewall and web servers are you running, including versions? Jun 30, 2013 at 6:04

1 Answer 1

7

Without knowing much of your environment, you might want to look at Squid as a reverse proxy which can easily do what you seek. A reverse proxy is basically a load-balancer. No need to do anything on your firewall; in fact, this simplifies your firewall configuration.

All subdomains would resolve to the same VIP (virtual IP) that lands on Squid configured to do web acceleration. You can easily configure to send incoming requests to different origin-servers based on the host header seen in the http request.

As a side benefit, you can do caching on Squid and serve static content directly from it without taxing your web servers. And the best part of this solution is that it's free.

1
  • I think that this is exactly what I am looking for! I will attempt to implement now -
    – William
    Jun 30, 2013 at 13:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.