Serve static Jenkins content using Apache along with mod_proxy_ajp Serve static Jenkins content using Apache along with mod_proxy_ajp jenkins jenkins

Serve static Jenkins content using Apache along with mod_proxy_ajp


You want to use ProxyPassMatch instead of ProxyPass, like in:

ProxyPassMatch ^/(?!static/) ajp://localhost:8009/

This should proxy only the stuff not in /static. Note that you may need to set up a web root for the static content (but first, you may want to check that it works).


As I mentioned in a comment to your question your proposed setup will likely not result in a lower load for Jenkins.

You could reduce the load on Jenkins by configuring Apache (or another webserver like ngix or proxy like squid) like a caching proxy. This will probably (you will have to test) remove part of the load from jenkins. However, since Jenkins by default does not set an expires date somewhere in the future for requests to the artifacts the proxy will still have to to a check with jenkins (returning hopefully a 304 instead of the full file) before serving the content to the client.