I have set up a redirect in my Apache virtual host serving several subdomains - call them a.example.com and b.example.com - serving a ruby on rails app.
On my virtualhost config file I have this rule:
rewriteEngine on rewriteRule proxy/(.+)$ http://news.example.com/$1 [P]
The idea is that I can do
http://a.example.com/proxy/news/a and get the contents of
http://news.example.com/news/a, but within the same subdomain, so ajax doesn't think my ajax requests are cross-domain - more info on this SO question.
The problem is that while it works just fine in my staging environment, it does not in production!
Both servers are Ubuntu server 10.04 . Apache came from the standard ubuntu repos, using
I have made a diff of the whole /etc/apache2/ dir and the only difference is the server name.
If I change the last option to [L], I get a redirect, so this makes me think that mod_rewrite is working. It just doesn't talk with mod_proxy.
By looking at the logs (
/var/log/apache2 and the rails log), it seems like the rewrite rule in production is simply being ignored - the logs are exactly the same as if it wasn't there.
How can I debug this? Can I force Apache to give me more information about why this particular rule isn't enforced when I access