Hi,
I have setup Jira server with Nginx proxying. A custom subdomain is configured with forwarding to the local instance of Jira. Here is the configuration that I use in nginx:
server {
server_name mysubdomain.mydomain.com
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:5555;
}
}
Almost everything works fine. However, there are some resources that are still loaded from 127.0.0.1 instead of the server_name, and due to that it doesn't load them. For example, below 3 resources are always pointing to 127.0.0.1:
1. projectavatar.svg
2. useravatar.svg
3. http://127.0.0.1:5555/images/icons/priorities/medium.svg
4. http://127.0.0.1:5555/images/icons/issuetypes/story.svg
5. The last step while connecting Jira to Bitbucket
Is the nginx configuration that I use missing something?
Has anybody experienced it as well?
Thanks,
Mubin
Hello,
The standard nginx config should specify the jira host in the proxy_pass, such as in the example from the documentation:
server {
listen www.atlassian.com:80;
server_name www.atlassian.com;
location /jira {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://jira-hostname:8080/jira;
client_max_body_size 10M;
}
}
Can you also verify if the Tomcat's context path and connector configuration has been updated?
The Jira host in my case is installed on the same server where nginx is running, and that is why I have
proxy_pass http://127.0.0.1:5555;
What is the need for updating tomcat's context path when it is running on root context?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, if Jira is running on a root context path. Can you check if the base Jira URL is set to the value in server_name and not the proxy_pass value? I'm thinking either the nginx proxy is not working exactly as expected, or the jira configuration is slightly wrong. It might be worth looking at the requests/responses with wireshark on the load balancer side.
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.