JIRA display is weird when accessing through apache in front of tomcat

Hi folks,

I configured the first time in my life the apache webserver and tomcat using JIRA.

Now I have one bad issue left!

If I access JIRA through port 8080 (direct tomcat) all is ok.

If I access JIRA through port 80 (apache -> tomcat using AJP 1.3) the content I see is really bad.. It seems like I am getting no images and no formatting of text, no structure and so on..

Hope you can help me, thanks! :)

4 answers

1 accepted

0 votes
Accepted answer

Here is how it works!! :)

I am so happy as it works now..

I don't know why I have to use such a RewriteRule..

Maybe there is a smarter solution - I don't know.

<VirtualHost x.x.x.x:80>

# JIRA Proxy Configuration:

ServerName jira.hostname

<Proxy *>

Order deny,allow

Allow from all


RewriteEngine On

RewriteRule ^/jira(.*)$ ajp://localhost:8009/jira$1 [P,L]

#RewriteCond %{HTTPS} off

#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

ProxyRequests Off


ProxyPass /ajp://jira.hostname:8009/jira/

ProxyPassReverse / http://jira.hostname/jira/

ProxyPassReverseCookiePath/jira /


Hi Dave.

i assume you've read this KB article


did you set a "Context path" ?

can you post the proxy & proxyReverse settings for your host?



yeah, I was going through this KB article! :)

I did set a context path: <Context path="/jira" ......

Here is my vh:

<VirtualHost *.*.*.*:80>

# JIRA Proxy Configuration:

ServerAdmin jira@domain

ServerName jira.domain

<Proxy *>

Order deny,allow

Allow from all


#RewriteEngine On

#RewriteCond %{HTTPS} off

#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

ProxyRequests Off

ProxyPass / ajp://domain:8009/jira/

ProxyPassReverse / ajp://domain:8009/jira/


SSLProxyEngine On
ProxyRequests           Off
ProxyPreserveHost       On
ProxyPass               /jira           ajp://localhost:8009/jira
ProxyPassReverse        /jira           ajp://localhost:8009/jira

this is my config

why you connect to <domain> if your jira is on ajp at localhost?

i think you need the ProxyPreserveHost directive as well

hm.. I have no idea whats going on..

I have now exactly your settings.. except SSLProxyEngine (but I actually have no SSL)..

Look at this path...?

http://jira.domain/jira/s/de_DE3hs8ib-418945332/849/3/18a4dc2c708dd57454fa134bf0dad058/_/download/contextbatch/css/atl.dashboard/batch.cssFailed to load resource: the server responded with a status of 404 (Not Found)

http://jira.domain/jira/s/de_DE3hs8ib-418945332/849/3/c2e41f2cf09f8b3c8914470a6617682d/_/download/contextbatch/css/jira.global/batch.cssFailed to load resource: the server responded with a status of 404 (Not Found)

http://jira.domain/jira/s/de_DE3hs8ib-418945332/849/3/ab0080b1e7b99e740b69e71918df70da/_/download/contextbatch/css/atl.general/batch.cssFailed to load resource: the server responded with a status of 404 (Not Found)

Oh YES! It works now! :)

This is my config now! I removed the jira path! ... Because in tomcat I have a context path = /jira ...

Thank you very much!

ProxyRequests Off


ProxyPass / ajp://localhost:8009/

ProxyPassReverse / ajp://localhost:8009/

is there maybe a problem using a context path = /jira and AJP together?

may I need ProxyPassReverseCookiePath ?

No there is no problem as you can see i use the same. Could you please remove the trailing / behind jira in proxyPass and proxyPassReverse? Take a look at my config lines.

it makes no difference... :(

in inspector :

path: /secure/Dashboard.jspathe only file which got found

all others, e.g:

path: /jira/s/de_DE3hs8ib-418945332/849/3/_/images/icon-jira-logo.png

HOW can I get rid of this /jira in the path. So.. why this prefix /jira is only on all files except Dashboard.jspa!?

I don't understand that....

Ok lets go through it again: 1. server base url is set correct? 2. context path is empty? 3. proxyPass derective is correct? In that case i'd suggest to purge your ${jira-install}/work/* directory after stoping jira. Restart it afterwards to force the tomcat to be rebuild

1. server base url: jira.localhost

2. I removed the context path = "/jira" - now its ""

3. proxypass is correct! it was correct all the time, if it would be wrong, I wouldn't see the jira startpage .. just without css, images etc... thats alone is my problem!

I deleted this and restartet tomcat etc..

It helped nothing.. :/

yes! exactly!

what I should search in my db? please explain.. thanks!

And you see that the images are tryin to be loaded from your-url/jira right? Could you check for it inside the database?
Must be some propertytext containing jiras base url.

In table propertytext are 7 rows.. but I can't see the base url.. what do you think..?

Don't know exactly atm. I will look for the right place as soon as i reach my home. Stay tuned
Oh great. That should be the right place. But is this the url you reach your jira?

okey! :)

I found something in propertystring:

| 10111 | http://jira.host


Wait a minute. Are you trying to add a subdomain to localhost?? A few lines before you said your base url is jira.localhost. Is that right?

Sorry for confusing.. I always use the hostname ;)

so.. jira.hostname .. always

thats strange. do you remeber adding any redirect or something in your vhost.cfg file that points on ${you_host}/jira ?

atm i got no idea where this should be comming from

I am not sure what do you mean by content is bad, here are few pointers to start with

1. Check the root url configured in general settings

2. User firebug or any other developer tool on browser to see, what response you are getting for media files.

1. my root url is exact the url I call in browser

2. hmm.. css, js and images -> 404 not found.. but why!?

Looks like the media requests are not reaching jira, can you check if there are any other mappings in Apache that might be conflicting.

I don't know where I should look for this.. In my vhosts.conf I have only the virtual host for jira defined.

Maybe completely wrong but.. Do I have to specify mime types in httpd.conf?

What I tried is to remove in my ajp forwarding the /jira at the end of my url.. so it worked, but I had to go to jira.domain/jira, and I want just to go to jira.domain

Isn't it strange?

It would help if you can share your vhost config , I hope you followed instructions mentioned here https://confluence.atlassian.com/display/JIRA/Integrating+JIRA+with+Apache

1. my root url is exact the url I call in browser 2. hmm.. css, js and images -> 404 not found.. but why!?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Jira

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,090 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you