Hi People,
I needing some assistance with mod_proxy.
Scenario: We have two domains and one external IP address and our router NAT'ing.
I need to get apache2 to reverse proxy two internal websites based on which domain they request.
Port 80 is getting answered by 192.168.1.50 (apache) (also domain cam34.com)
This box should also reverse proxy tim.com to 192.168.1.100
Using this virtual host conf file - whenever I enter cam34.com or tim.com I always get tim.com
Hope that makes sense.
Code:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
ServerName cam34.com
DocumentRoot /srv/www/htdocs
ErrorLog /var/log/apache2/cam-error_log
CustomLog /var/log/apache2/cam-access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName On
# configures the footer on server-generated documents
ServerSignature On
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/srv/www/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<proxy>
Order deny,allow
Allow from all
</proxy>
ServerName tim.com
ProxyPass / http://192.168.1.100/
ProxyPassReverse / http://192.168.1.100/