Difference between socket- and port-based connection to outer NGINX?

I think there is a typo in the tutorial. At the end of the first line is a colon too much. Don’t forget to rebuild!

For https installations It should be:

        proxy_pass              http://unix:/var/discourse/shared/standalone/nginx.http.sock;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        Host $host;
        proxy_http_version      1.1;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto "https";

Remove the last line if you do not use https. If this does not work, please type the following at the console and show us the result:

ls -al /var/discourse/shared/standalone/nginx.http.sock
updatedb && locate nginx.http.sock

If “locate” ist not found, you can install it:

apt-get install locate
5 Likes