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
|
|
|