Using Apache to serve Jira’s static files (css, images,etc)

Gavin Fowler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 20, 2011

I wondered if anyone can help me with the following for me:

I have a Jira installation that sits behind an apache 2.2 http proxy running on Ubuntu 10.4. Currently my apache virtual host “proxies” all request to http://localhost:8080/jira. Knowing that the bundled Tomcat 6 is very fast, I can’t help thinking that I can save some cycles by configuring Apache to serve up static content directly rather than passing request of this type on to Tomcat

I have read through PierFumagalli’s very informative document: http://wiki.apache.org/cocoon/ApacheModProxy. The methods outlined PierFumagalli suggest setting a DocumentRoot and then instructing Apache not to pass requests to folders like “Static” through the proxy. The second method looks to serve all static content (gif, jpg, etc) using mod_rewrite. This leads me to think I can come up with an Apache configuration that services requirement (apache to serve static content).

The area I’m having trouble in is establishing what Jira application directories and/or files I can instruct Apache to serve directly rather than passing to the proxy. It all pivots around setting a DocumentRoot .

Has anyone attempted this before – do you have any examples, advice?

Many thanks

Gavin.

4 answers

1 accepted

0 votes
Answer accepted
Jim Birch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2011

If you just use an Apache front end won't it cache static files anyway? AFAIK Jira is already highly optimised to not resend redundant information so you might potentially be making things worse not better. There have been some articles on the built in performance optimisation in the Atlassian blog you might usefully read.

0 votes
Valentijn Scholten
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2011

As long as you make sure Tomcat uses the APR (Apache Portable Runtime), you won't save a lot by having apache serve the static content.

http://www.coderanch.com/t/524902/Tomcat/APR-based-Apache-Tomcat-Native

http://www.techbrainwave.com/?p=1017

0 votes
Gavin Fowler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2011

No real reason other than the assumption that by taking the load away from Jira/Tomcat and letting apache (my proxy) handle these request directly rather than forwarding the request on.

0 votes
Colin Goudie
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2011

Just a question? Are you experiencing that JIRA is slow? What benefit do you get out of this? What is the size of your installation and how many requests is is servicing per minute/hour etc..?

Suggest an answer

Log in or Sign up to answer