OpenVZ Forum


Home » General » Support » Proxy webserver
Proxy webserver [message #34473] Fri, 09 January 2009 10:00
alfonsodiecko is currently offline  alfonsodiecko
Messages: 14
Registered: October 2008
Junior Member
Hi,

I have a question to the tutorial "Shared webhosting" part "Proxy webserver". In the last step is it necessary to add some lines for VirtualHost . But on which Server must I do that , on the Server where my Proxy runs or where my website runs ? My Root has the ip 217.117.xxx.xx(with a website) the vz with the proxy 192.168.172.49 and 192.168.172.50(with a website). At first I have add the lines in the /etc/lighttpd/lighttpd.conf on 192.168.172.49

$HTTP["host"] == "domain1.tl" {
  proxy.server  = ( "" => ( ( "host" => "217.117.xxx.xx" ) ) )
}

$HTTP["host"] == "domain2.tl" {
  proxy.server  = ( "" => ( ( "host" => "192.168.172.50(" ) ) )
}
, on 217.117.xxx.xx
iptables -t nat -A PREROUTING -p TCP -d 217.117.xxx.xx --dport 80 $dnat 192.168.172.49:80
.

Well, the next is to configure the VirtualHost in 192.168.172.50,

<VirtualHost 217.117.xxx.xx:80>
        ServerName domain2.tl
        RewriteEngine     On
        RewriteRule       ^(.*)$        http://192.168.172.50$1  [P]
        RewriteRule       ^(.*)$        http://www.domain2.tl$1   [P]
</VirtualHost>
, is that right ?

regards chris

[Updated on: Fri, 09 January 2009 10:25]

Report message to a moderator

Previous Topic: Yum upgrade Fedora 10 - dummy-centos-4
Next Topic: New to OpenVZ - seeking network configuration suggestions
Goto Forum:
  


Current Time: Thu Nov 14 02:28:13 GMT 2024

Total time taken to generate the page: 0.02987 seconds