How to setup a virtual website using revers-proxy on apache webservers? Read on! |
De uitgangssituatie:
Twee servers: ventoux 10.0.2.3
galibier 10.0.2.5
Website r71.nl wijst naar ventoux.
Website music.r71.nl moet worden gekoppeld aan virtuele host op webserver Galibier.
[root@ventoux root]# more /etc/httpd/conf/httpd.conf
NameVirtualHost 10.0.2.3:80
<VirtualHost 10.0.2.3:80>
ProxyPreserveHost On
ProxyPass / http://10.0.2.5/
ProxyPassReverse / http://10.0.2.5/
ServerName music.r71.nl
</VirtualHost>
[root@galibier root]# more /etc/httpd/conf/httpd.conf
NameVirtualHost 10.0.2.5:80
<VirtualHost 10.0.2.5:80>
ServerAdmin roderick@r71.nl
DocumentRoot /var/www/html/ampache
ServerName music.r71.nl
</VirtualHost>
Op beide servers:
[root@galibier en ook ventoux root]# more /etc/httpd/conf/httpd.conf
#<IfModule mod_proxy.c>
#ProxyRequests On
#<Proxy *>
# Order deny,allow
# Allow from all
#</Proxy>
#ProxyVia On
Leave a Reply