1

I'm trying to setup a reverse proxy to my JIRA instance using Nginx.

server {
  listen 80;
  server_name jira.domain.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://localhost:8080;
  }
}

Every time I hit the url directly, I get the default "Welcome to Nginx" page. If I refresh, it then takes me to the JIRA Dashboard. I'm having the same issue going to my Confluence box behind Nginx. What am I missing to get this to work correctly?

Cesar
  • 173
  • 6

1 Answers1

0

There isn't anything wrong with the code, the server_name is set correctly from what I can see. If you're accessing IP address of the server, than it wouldn't be served as NGINX is (in your configuration) only configured to display content from "jira.domain.com".

By the way, could you elaborate a bit? How about the rest of the configuration, if it's compiled or installed by an installer? Your "nginx.conf" or "default.conf"?

Aaron
  • 26
  • 2
  • It is a clean Ubuntu 14.04 box with Nginx installed via apt. Dropped that in jira.conf in /etc/nginx/sites-available and sym-linked into /etc/nginx/sites-enabled. – Cesar Jan 18 '16 at 04:23
  • ubuntu 14.04 is already out of Support if possible upgrade;, if you try to access your Page With the ip you have to Set the host also like that, however... nginx - T will help you to identfy the config, i am Sure that the host is not regionized and i use in my config proxy_set_header Host $http_host; – djdomi Jul 27 '19 at 18:07