Posted by: mahinctg | January 26, 2012

Reverse Proxy with Apache VirtualHost

This example will show you how to configure Reverse Proxy with Apache Virtual Hosting. This is in addition to my last Reverse Proxy post.

########################

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin abc@xyz.com
DocumentRoot /var/www/html/
ServerName abc.xyz.com
</VirtualHost>

<VirtualHost *:80>
ServerAdmin abc@xyz.com
ServerName revprx.xyz.com

<Proxy *>
Order allow,deny
Allow from all
</Proxy>

ProxyPass / http://192.168.105.5/ nocanon
ProxyPassReverse / http://192.168.105.5/

</VirtualHost>

##########

This way you can have any Number of Virtual Host with Local Content and also with Reverse Proxy enabled. Hope this Helps.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.