So I'm stymied. I have a webapp that uses Django and I'm using mod_wsgi to integrate it with apache. However, another person has a directive on the same machine that proxies to another server. The apache config is roughly:
My App
WSGIScriptAlias /stuff /foo/foo/wsgi.py
WSGIPythonPath /foo
<Directory /foo/foo>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
His App
<Location "/">
Order Allow,Deny
AllowFromAll
ProxyPass myotherserver
ProxyPassReverse myotherserver
</Location>
Unfortunately, his Location directive overrides my script directive, and all my requests to http/www.bar.com/stuff end up getting forwarded to http://www.myotherserver.com/stuff without even running through the wsgi script. How do I make requests to /stuff direct to django and not to the proxypass without messing up his code or taking apart his implementation on the other server? I've tried doing
RewriteEngine on
RewriteCond %{REQUEST_URI} ^!/stuff
RewriteRule ^.*$ /bat/$1 [NC,PT]
<Location "/bat">
Order Allow,Deny
AllowFromAll
ProxyPass myotherserver
ProxyPassReverse myotherserver
</Location>
But this prepends an invalid /bat directory onto my request when it gets to the other server, and breaks all the links on his page. I don't want to go hack all his links.