Apache: running virtual websites using reverse proxy

Apache: running virtual websites using reverse proxy

Apache: running virtual websites using reverse proxy 150 150 Roderick Derks
Image
 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

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message