Forum Moderators: phranque
I have a situation where I have two servers looking after a single website (for various reasons!)
I have www.mywebsite.com sat on server A and I have foo.mywebsite.com sat on server B.
Now what I am wanting to achieve is to make all requests to www.mywebsite.com/foo to "pull" the content from foo.mywebsite.com
Because the content is sat on two different servers, I am guessing I have to use mod_proxy to do this... I was wondering if you could give me some help there.
On server A in my virtual host definition I have the following:
ProxyRequests Off
ProxyPass /foo [foo.mywebsite.com...]
ProxyPassReverse /foo [foo.mywebsite.com...]
The problem is when I then go to www.mywebsite.com/foo I get a 503 error.
I have gone onto server B and put this into the virtual host settings for foo.mywebsite.com:
ProxyRequests On
ProxyVia On
<Directory proxy:*>
Order deny,allow
Deny from all
Allow from [IP address of www.mywebsite.com]
</Directory>
and that doesn't help much.
Would appreciate any thoughts or advice!
A 503 error is pretty specific, and is actually pretty hard to invoke (you must explicitly add code to do it).
The first paragraph above actually corresponds more closely to a 502 error. But make sure you don't have any firewalls, filters, or manual code added that would block proxied requests.
Sorry this is a somewhat "scattered" reply -- In a bit of a rush.
Jim
Would it be code in server A (www.mywebsite.com) or code in server B (foo.mywebsite.com) that would be headering a 503?
Server A is able to lookup the IP address for foo.example.com
This is a response code that is most often used (set up "manually" and deliberately) to declare an overloaded server or to declare that the server's normal operation is unavailable due to extensive system maintenance.
It is also sometimes used by 'security' modules to reject abusive (or apparently-abusive) requests in a way that doesn't give the (presumably-malicious) requesting user-agent very much information. That's why I asked about any firewalls and/or security filters in your hardware or software set-up.
Jim