So Confused myself, so I need an expert reverse proxy help here please.
Server 1 on Public IP - 173.xxx.xxx.xxx port 80 (LAN IP is 10.1.10.2).
Server 1 also has a local DNS enabler so that local users are able to browse all of our 4 registered domains within our local LAN.
Server 2 is on local LAN with local IP 10.1.10.2
First question is:
Where will my proxyPass statement below should go if I want my Server 2 to be accessible from the internet? Will go to Server 1 or Server 2. Or do I need to have the same statement for both Server 1 and Server 2? I tried putting this on either but I can not make it work. It sort of work once but users only see domain1.com all the time no matter which domain they use on their browser.
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://WhichIPand:Port/
ProxyPassReverse / http://WhichIPand:Port/
Question 2: httpd-vhosts.conf Can I continue using virtual hosts on both Server 1 and Server 2 ? I am currently using virtual host on Server 1 with 4 registered domains. I want to move 2 domains off of Server 1 to Server 2 so that,
Server 1 will have: domain1.com, domain2.com
Server 2 will have: domain3.com, domain4.com
Question 3: What would my host file look like for both Server 1 and Server 2 with each has 2 qualified domains. Will it be this way or put all local LAN IP on each Servers.
127.0.01 domain1.com
127.0.01 domain2.com
127.0.01 domain3.com
127.0.01 domain4.com
I know this may look too much, but this really will help a lot of people also other than me. But me, I am so lost right now and someone with a great mind and teaching skills should be able to help,
Thanks and merry christmas to all.
added this in response to Shane and Aaron:
This is what I got so far and its not getting me anywhere. maybe you can help and really thank you for your replies...
My Server 1 on public IP 173.1xx.1xx.xxx port 80 (LAN IP is 10.1.10.2) OSX Lion setup on virtual host: httpd-vhost.conf
With this setup, I am getting:
Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
NameVirtualHost *
<VirtualHost *:80>
ServerName domain1.com
ServerAlias www.domain1.com
ServerAdmin admin@domain1.com
DocumentRoot "/Library/WebServer/joomla"
ErrorLog /Library/WebServer/joomla/error_domain1.log
<Directory "/Library/WebServer/joomla">
Options Indexes FollowSymLinks MultiViews
AllowOverride All AuthConfig
Order allow,deny
Allow from all
</Directory>
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://10.1.10.2:8080/
ProxyPassReverse / http://10.1.10.2:8080/
</VirtualHost>
<VirtualHost *:80>
ServerName domain2.com
ServerAlias www.domain2.com
ServerAdmin admin@domain2.com
DocumentRoot "/Library/WebServer/webb"
ErrorLog /Library/WebServer/webb/error_domain2.log
<Directory "/Library/WebServer/webb">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://10.1.10.2:8080/
ProxyPassReverse / http://10.1.10.2:8080/
</VirtualHost>
My Server 2 on LAN IP: 10.1.10.2, OSX Snow setup on virtual host: httpd-vhost.conf
<VirtualHost *:80>
ServerName domain3.com
ServerAlias www.domain3.com
ServerAdmin admin@domain3.com
DocumentRoot "/Library/WebServer/domain3"
ErrorLog /Library/WebServer/domain3/error_cj.log
<Directory "/Library/WebServer/domain3">
Options Indexes FollowSymLinks MultiViews
AllowOverride All AuthConfig
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName domain4.org
ServerAlias www.domain4.org
ServerAdmin admin@domain4.org
DocumentRoot "/Library/WebServer/domain4"
ErrorLog /Library/WebServer/domain4/error_fn.log
<Directory "/Library/WebServer/domain4">
Options Indexes FollowSymLinks MultiViews
AllowOverride All AuthConfig
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
ProxyPassstatements located on server 1, and does it have vhosts for other sites? Does server 2 have vhosts for the sites that it's supposed to serve? – Shane Madden Dec 21 '11 at 19:49ProxyPassstatements are pointing to port 8080 when both of your Apache listeners look to be on port 80? – Shane Madden Dec 21 '11 at 21:36