Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I have jira installed and I access i through mydomain.com:8080/jira. I'd really like to access i through jira.mydomain.com. I enabled mod_proxy and put the following in an apache vhost:

ServerName jira.mydomain.com

ProxyPreserveHost On
ProxyPass / http://localhost:8080/jira

But, it forwards me to jira.mydomain.com/jira. Which doesn't work. I changed the base URL in jira to jira.mydomain.com also. What's going on here, why does the extra /jira exist?

I installed jira as a war installation as I'm running other apps through tomcat (confluence, hudson etc)

share|improve this question
add comment

2 Answers

Try to add

ProxyPassReverse / http://localhost:8080/jira
share|improve this answer
    
Still didn't work. Could this be a tomcat issue, where it always forwards to the context path? This is my first tomcat install with an attempt to proxy through apache so I don't know much about this. I tried changing the context path to just / in my jira.xml file, to no avail. –  brad Oct 17 '09 at 17:24
    
Don't know Tomcat enough to answer. But you probably need to change something in some tomcat .xml configuration file where JIRA application is defined. –  radius Oct 17 '09 at 18:05
add comment
up vote 0 down vote accepted

Radius you were so close, apparently i need a trailing / after the proxypass directives, so:

ProxyPreserveHost On
ProxyPass / http://localhost:8080/jira/
ProxyPassReverse / http://localhost:8080/jira/

Worked like a charm. I then needed to add a re-write so all the static images/css etc would be mapped:

RewriteEngine On
RewriteRule       ^/jira(.*)$  http://localhost:8080/jira$1 [P,L]

Worked like a charm

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.