1

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)

brad
  • 492
  • 1
  • 10
  • 22

2 Answers2

1

Try to add

ProxyPassReverse / http://localhost:8080/jira
radius
  • 9,545
  • 23
  • 45
  • 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
0

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

brad
  • 492
  • 1
  • 10
  • 22