Apologies for asking *another* mod_proxy question.
I have a CherryPy application running on port 8081 which I'm
publishing under a virtual path managed by Apache.
Currently I have:
ProxyRequests Off
ProxyPreserveHost On
# Serve static content using Apache
Alias /btc/media /home/btc/website/data
<Directory /home/btc/website/data/>
Order allow,deny
Allow from all
</Directory>
Alias /btc/styles /home/btc/website/styles
<Directory /home/btc/website/styles/>
Order allow,deny
Allow from all
</Directory>
ProxyPass /btc/styles !
ProxyPass /btc/media !
# Send all other /btc requests to CherryPy
<Location /btc>
Order allow,deny
Allow from all
ProxyPass
http://localhost:8081
ProxyPassReverse
http://localhost:8081
</Location>
This is served at:
http://musariada.mus.uea.ac.uk/btc
This all works fine *without* the ProxyPreserveHost On directive.
Two parts of my application are implemented as separate classes which
are mounted into the CherryPy tree simply by adding instances of them
as properties of the root object:
root = Catalogue()
root.works = Works()
root.search = Search()
These two classes both implement index() methods, and Works also
implements a default() method. Works's default method works fine (e.g.
http://musariada.mus.uea.ac.uk/btc/works/BTC1). However, with
ProxyPreserveHost On, neither of the index methods work properly. For
example,
http://musariada.mus.uea.ac.uk/btc/works?offset=0&limit=25
should call Works's index method with two arguments. However, the
request seems to get re-written to
http://musariada.mus.uea.ac.uk/works?offset=0&limit=25,
CherryPy returns 303 and Apache returns 404 to the client.
Any ideas why ProxyPreserveHost On would be causing this to happen?