Atlassian Confluence and NGINX

I’ve always been an apache guy, but I thought it might be good to get NGINX going at home on some lower spec machine and have it forward http requests to other hosts where they can be served.

I finally got my Atlassian Confluence install going at home again, so I thought perfect time to install NGINX and configure it to be the frontend for the requests. Just like my previous post here. I want NGINX to listen on http (tcp/80) for a certain vhost name and forward those requests to my confluence install else where on my network running on the default 8090 port.

Create new site, example of my configuration below;

Filename: /etc/nginx/sites-available/confluence
File Contents:

server {
    listen 80;
    server_name wiki;
    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;

Now you should link this site file into /etc/nginx/sites-enabled as the same name and restart nginx.

If your dns for and wiki in my example point to the NGINX host, they will forward to on port 8090. Which is where my confluence would be running. Be sure to update confluence site name to match the vhost being used.

Simple as that, bit of a different take on the example Atlassian provide over here.