Thanks Owen,
For future reference to those who may search the archive, I also had to
edit /etc/sysconfig/apache2 and find the line that says
APACHE_MODULES="blah blah blah" and add "proxy" and "proxy_http" to the
list of modules.
However, now only the first page, the index.html page, is being proxied
through OK. The rest of the site requires authentication with a username
and password and that doesn't seem to proxy through correctly. The error
I get is:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /directoryname.
Reason: DNS lookup failure for: 192.168.0.9directoryname
Additionally, a 502 Bad Gateway error was encountered while trying to
use an ErrorDocument to handle the request.
Apache/2.0.53 (Linux/SUSE) Server at newwebsite.com Port 80
Any thoughts on how to fix this?
Brian
Boyle Owen wrote:
-----Original Message-----
From: Brian C [mailto:[EMAIL PROTECTED]
Sent: Montag, 21. November 2005 20:13
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] Virtual Hosts behind Firewall Router
Hi,
My network looks like this:
[Internet]
|
[Static IP:64.x.x.x]
|
[router/firewall:192.168.0.1]
[port 80 traffic]___[port 53 traffic]_______[??nothing yet??]
______|____________________|______________________|_____________
[main srvr:192.168.0.5|DNS srvr:192.168.0.6|NEW srvr:192.168.0.9]
The main server runs Apache 2.0 on OpenSuse and uses
name-based virtual
hosts to host about 5 low-traffic web sites. The DNS server runs BIND.
Now I want to run a new website on the new server, which also runs
Apache. However, all my port 80 traffic is routed to the main server.
So, how can I send requests for www.newwebsite.com to the new server
rather than having it end up at the main server?
Your diagram is very clear - worth a thousand words...
There are at least two ways you can do this:
[Assumption: www.newwebsite.com resolves to Static IP:64.x.x.x, same as all
main server sites]
1) Apache solution: Set up a new name-based VH in the main server to serve the
new site and then proxy all requests to new server:
in main server config:
<VirtualHost *>
ServerName www.newwebsite.com
ProxyPass / http://192.168.0.9/
ProxyPassReverse / http://192.168.0.9/
</VirtualHost>
Then all traffic can stay on port 80 on both servers. See
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypass
1) FW solution:
a) route requests based on port number (I'm assuming your FW can do
this...)
64.x.x.x:80 --> 192.168.0.5:80
64.x.x.x:8080 --> 192.168.0.9:80
Then people have to access the new site like www.newwebsite.com:8080
b) route requests based on Host header (I'm assuming your FW can do
this...)
5 original site names --> 192.168.0.5:80
new site name--> 192.168.0.9:80
Then people can access the new site like www.newwebsite.com
Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.
What would I
change in
the main server's vhosts config (if anything), what would the new
server's vhosts config look like, and would any of this impact my DNS
files?
If it creates an easier solution, I wouldn't even care if the new
server's address had to be www.newwebsite.com:## where ## was some
unused port, because the newwebsite is going to be password protected
for just my own use anyway.
Also, if it sounds like I know what I'm talking about, that's a false
impression. Please explain things with lots of details. I
barely figured
out the above.
Thanks for any advice. I hope the picture above is clear.
Brian
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]