Several Webserver [message #38841] |
Thu, 11 February 2010 09:56 |
snoopy
Messages: 2 Registered: February 2010
|
Junior Member |
|
|
This topic is only for Port 80 (http).
My HN gets the traffic on port 80 from the firewall. Now there are several (today: three) virtual servers on this HN running.
All have their own apache webserver running - of course on port 80.
it's not possible to move every VM to a different port (A 0 8080, B = 8081, ...). nobody wants to explain the customers how to enter the normal, public website with an extra port address.
Any ideas ?
FYI:
Topic also in German: http:// forum.openvz.org/index.php?t=tree&th=8314&start=0&am p;
|
|
|
Re: Several Webserver [message #38850 is a reply to message #38841] |
Thu, 11 February 2010 15:07 |
Paparaciz
Messages: 302 Registered: August 2009
|
Senior Member |
|
|
if I understand correctly you have HN with only 1 public ip address, and all VE with private ip address. then you want that each VE can be accessible through different port(8000,8001,8002)?
you can do in HN
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 8000 -j DNAT --to-destination first_VE_ip_address:80
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 8001 -j DNAT --to-destination second_VE_ip_address:80
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 8002 -j DNAT --to-destination third_VE_ip_address:80
or on HN you can install say "proxy"
which can pass traffic to VE based on accessed domain
then each VE could be accessed not by port, but by
http://configured_domain_for_first_VE will pass traffic to first VE
in apache it can be done using proxypass
|
|
|