I have the below apache virtualhost configuration. ProxyPassReverse does not appear to be converting the URLs properly.
URL http://www.example.com/9999pcap/
shows a directory listing on a remote device and the directory listing looks fine but if you click on a file captype1.pcap1.gz
to download it you get
The requested URL /captype1.pcap1.gz was not found on this server
and the URL bar shows /captype1.pcap1.gz
. If you manually change the URL to /9999pcap/captype1.pcap1.gz
it properly downloads the file.
[Sat Dec 06 19:19:33.265254 2014] [core:info] [pid 22470:tid 139711796442880] [client 127.0.0.1:56469] AH00128: File does not exist: /var/www/html/captype1.pcap1.gz, referer: http://www.example.com/9999pcap/
URL /9999/
shows the login page of a remote device but it looks wrong because it's not properly downloading style sheets and other files and attempting to login fails with
The requested URL /cgi-bin/luci/ was not found on this server.
Can anyone tell me what I'm doing wrong here? Thanks!
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
DirectoryIndex index.html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
LogLevel debug
ProxyRequests Off
ProxyPreserveHost Off
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
<Location /9999/>
ProxyPass http://localhost:22002/cgi-bin/luci/
ProxyPassReverse http://localhost:22002/cgi-bin/luci/
</Location>
<Location /9999pcap/>
ProxyPass http://localhost:22003/
ProxyPassReverse http://localhost:22003/
</Location>
</VirtualHost>