Environment:
- Novice user (thats me) on all mentioned points
- CentOS 6.4 x86_64
- OpenJDK 1.7.0_65
- Apache httpd 2.2.15 + mod_ssl 2.2.15 - Acts as proxy using mod_proxy_ajp, no other webapp
- Jenkins 1.562 - Runs only on ajp port 8009, no web prefix
I am able to access URL https://host/
and I see the jenkins UI.
[I did not add AllowEncodedSlashes NoDecode
, ProxyRequests Off
or nocanon
, yet it seems to work ... but for the significance of those, I will search/ask another question.]
This is the only line I added to /etc/httpd/conf.d/ssl.conf
(just before </VirtualHost>
that matches <VirtualHost _default_:443>
):
ProxyPass / ajp://localhost:8009/
I was under the impression that fronting Jenkins with Apache httpd would mean
- Native binaries (instead of Java bytecode) to handle the remote connection parts
- Ability to serve static content (images, build artifacts, console logs) without burdening the Jenkins server process
If that understanding is right, I am looking for Apache httpd configuration rules that will enable Apache httpd to serve static content from Jenkins. I already tried:
ProxyPass /static !
With
DocumentRoot "/var/cache/jenkins/war"
But that leads to an unusual page (hard to identify as Jenkins ... I did not test links). When I enabled access log for Jenkins (via /etc/sysconfig/jenkins
), such entries showed up (only excerpts copied below):
/static/6a3788e2/scripts/yui
/static/6a3788e2/css/
/adjuncts/6a3788e2/lib/layout/breadcrumbs.css
When the Jenkins service is restarted, a different text shows up. How do we configure Apache httpd to send out static content ?
I've also tried hosting jenkins.war on tomcat (tomcat6 package deployed via yum) on the default HTTP connector port 8080 (i.e. without mod_proxy_ajp). Each time I restart tomcat, the URL element after static
differs.
PS: Don't have enough credits to create a tag mod_proxy_ajp, using mod_proxy instead. However, I can offer a bounty of 50 credits. Please vote up the question if you believe there was genuine effort put into this.