I've managed to get Jira up on my server now, it's a vanilla installation straight from the install docs running on port 8990 and connected to a postgres db on localhost.
My reverse proxy is Caddy, it simply redirects http://jira.mydomain to http://localhost:8990 (no SSL, that looks like a nightmare to set up, one of the reasons I use Caddy is the automated SSL - but I won't bother with that right now).
I first got the baseurl error which I fixed. Now I'm getting this other error which seems like its trying to use localhost for every reletive address.
The dashboard shows the `UrlHostnameMismatchException` but I've tried to set the hostname URL via server.xml:
<Engine name="Catalina" defaultHost="jira.mydomain"> <Host name="jira.mydomain" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
Restarted and still the same error. How on earth do I fix this? Do I have to modify the Caddy config to do something or change the Jira config?
I'd rather not install another proxy just for Atlassian apps, Caddy does a great job for my existing services and the painless HTTPS support is great.
I figured it out straight after, but maybe this will be useful. If you're a Caddy reverse-proxy user and you stumbled upon this, I hope it helps!
The solution is to add a `proxyName` and `proxyPort` attribute to the `<Connector>` object:
<Connector port="8990" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" proxyName="jira.mydomain" proxyPort="80"
Annoyingly, this information was buried in Apache specific documentation whereas it's software-agnostic when it comes to reverse proxy applications.
I'm now going to try HTTPS with Caddy's auto-installed certs and update this response...
SSL with Caddy's auto-install was simpler than I thought!
Just add the `scheme` field alongside `proxyName`, set `proxyPort` to 443 and modify your Caddyfile to use https.
... proxyName="jira.mydomain" proxyPort="433"
scheme="https"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might also want to add:
secure="true"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh yeah I forgot to mention, I was looking for documentation on that attribute but couldn't find any. What does it actually mean?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to provide additional clarity, the modifications referenced are for the tomcat server.xml.
This answer helped me, but required slight modifications based on this thread (as I am running docker instance):
If you are also using Docker, this folder location should be persisted:
Thanks for your prompt response. After reading instructions, I am putting both directory in volumes
volumes:
- jira-home-data:/var/atlassian/application-data/jira
- jira-app-data:/opt/atlassian/etc/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.