Ok
I have Confluence running under Ubuntu 16.04. I now have JIRA running as well on the same server. Nginx is forwarding port 8090 to port 80 without issue for Confluence so I can just goto domain/confluence. I set up JIRA to work this way as well.
I keep getting a 404 Not Found
error from Nginx.
When I tail the Nginx error log, I am seeing this:
2016/07/01 17:27:29 [error] 50688#50688: *2 open() "/usr/share/nginx/html/jira" failed (2: No such file or directory), client: xx.xx.xx.xx, server: www.xxxxxx.net, request: "GET /jira HTTP/1.1", host: "xxxxx.net"
I know why this error is happening but I cannot for the life of me figure out where Nginx is getting the path its looking for from. Its technically passing the traffic correctly to Apache but its appending /jira
to the end of the default directory which is resulting in the 404 not found because that location literally does not exist.
Where is Nginx reading the default location from?
I removed everything in my sites-available
and sites-enabled
directories minus the one needed to set up the forwarding. Apache also has no sites in either of its directories. I checked the Nginx.conf and I dont see that path there. I have restarted all of my services as well.
Confluence sites-enabled config
root@confluence:/etc/nginx/sites-enabled# cat confluence
server {
listen www.xxxx.net:80;
server_name www.xxxx.net;
location /confluence {
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:8090/confluence;
}
}
JIRA sites-enabled config
root@confluence:/etc/nginx/sites-enabled# cat jira
server {
listen www.xxxx.net:80;
server_name www.xxxx.net;
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://localhost:8080/jira;
client_max_body_size 10M;
}
}
I am at a loss!!
EDIT
So it seems like Nginx is reading this from this file:
/etc/nginx/sites-available/default
The issue here, is this file no longer exists. I have stopped/started/reloaded Nginx. Its still wanting to append that directory before the /jira
.
/etc/nginx/sites-enabled
. Is a symlink to the default config file present there?