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

**URL:** https://meta.discourse.org/t/difference-between-socket-and-port-based-connection-to-outer-nginx/60071
**Category:** Self-hosting
**Created:** [March 29, 2017, 12:09am UTC](https://meta.discourse.org/t/difference-between-socket-and-port-based-connection-to-outer-nginx/60071 "2017-03-29T00:09:05Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Lutz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lutz/32/65103_2.png) [@Lutz](https://meta.discourse.org/u/Lutz)
#### Post date: [March 29, 2017, 12:41am UTC](https://meta.discourse.org/t/difference-between-socket-and-port-based-connection-to-outer-nginx/60071/4 "2017-03-29T00:41:45Z")

</div>

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:

```plaintext
        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:

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

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

```plaintext
apt-get install locate
```

---

_[View the full topic](https://meta.discourse.org/t/difference-between-socket-and-port-based-connection-to-outer-nginx/60071)._
