I have a web application project with very large media files and I would like them seperate from the rest of the application but remain in the same path.
So for example,if I have a file in the apache document root:
but the rest of my app resides in the tomcat app directory:
is there a way to see if Apache has the file and then if not look in Tomcat and then if nothing is found then give the 404?
I've tried doing this just now and got a tomcat 404. This is because my tomcat is running behind Apache and all requests are sent directly to tomcat.
Is there a way to see if Apache has the file, then if not found, look in Tomcat and then, if nothing is found again, then give the 404?
It would also be preferential is the opposite were true, if I could go from tomcat to apache to 404, I could just drop the entire application + media files in apache, then drop new versions of the app in tomcat. I wouldn't have to do a diff between the two directories.
Here is my current configuration file I use for tomcat:
<VirtualHost *:80> ServerName localhost ServerAlias website.com ProxyRequests Off ProxyPreserveHost On ErrorLog /var/log/httpd/tomcat.error.log CustomLog /var/log/httpd/tomcat.log combined <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ </VirtualHost>