• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

For all my points: 2 Web Servers, 1 Firewall, 1 IPAddress?

I've got two domains, each with a separate web site and mail server.  I also have a LAN masqueraded behind a firewall.

Right now, this is using 3 IP addresses.  If I can get to 1, I get a gold star ($30/mo cheaper DSL service :-)

I know I can do port forwarding to get one of them pulled in, but that doesn't really get me anything.  Is there a more sophisticated version of port forwarding that'll deconstruct packets coming in on a given port (like, say, port 80 :-), figure out which are trying to reach which domain name, and then forward them along to different locations depending on the results?


Thanks,

-Ben
0
benha
Asked:
benha
1 Solution
 
jlevieCommented:
What web server are you using and does it support something like Apache's "Name based virtual hosts"? That's a mechanism that allows the web server to provide a virtual host capability using a single IP address. The various virtual hosts are distinguished by the hostname in the URL. You can read about it and get an idea of how it works from the Apache docs at: http://www.apache.org/docs/vhosts/index.html. Obviously both web servers will need to be on one box.

The mail issue can probably be handled by a clever sendmail configuration and some MX records. Perhaps by the use of the virtualhost capapbility and/or a usermap, or by using a sendmail relay. I can't tell for certain which way would be best without knowing more specifics.
0
 
pheurCommented:
You can manage with a single IP. Apache is simple to set up to use multiple domains on a single IP (domain selection can be based on the host part of the URL - name based vhosts). Sendmail also allows that, but the exact setup depends on your needs (for the same users on all the domains you don't need to do anything, in other cases you will have to play with virtusertable).

Sample (working) apache setup:

NameVirtualHost 194.102.215.2
<VirtualHost 194.102.215.2>
    ServerName www.maxnet.ro
    DocumentRoot /var/www/www.maxnet.ro
</VirtualHost>
<VirtualHost 194.102.215.2>
    ServerName www.sumi.ro
    DocumentRoot /var/www/www.sumi.ro
</VirtualHost>

The above example is from a config with 14 vhosts on a single IP. Sendmail was configured with virtusertable and there are office@... accounts on 4 different domains on the same server.
0
 
benhaAuthor Commented:
Thanks for the help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now