I have a rather interesting situation that came up yesterday.
An OAuth callback is statically set to domain2.com/appname however all
other web2py apps are hosted out of http://web2py.domain1.com/appname
So I have an Apache config like:
<VirtualHost *:80>
DocumentRoot "/home/domain1"
ServerName web2py.domain1.com
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / /
</VirutalHost>
that's been around for months, and to this I added:
<VirtualHost *:80>
DocumentRoot "/home/domain2"
ServerName mail.domain2.com
ServerAlias www.domain2.com domain2.com
ProxyPass /appname http://127.0.0.1:8000/appname
ProxyPassReverse /appname http://127.0.0.1:8000/appname
</VirtualHost>
The problem came from what happens when I hit an error, the link to
the cookie when I'm logged in looks something like:
http://www.domain2.com/admin/appadmin/.......
But the /admin app isn't mapped to domain2.com. What's a simple
rewrite I can do to get it back to
http://web2py.domain1.com/admin/appadmin/ ?