# Unix:/var/discourse/shared/standalone/nginx.http.sock (2: No such file or directory) \[SOLVED\]

**URL:** <https://meta.discourse.org/t/unix-var-discourse-shared-standalone-nginx-http-sock-2-no-such-file-or-directory-solved/142342>\
**Category:** Self-hosting\
**Created:** [22 februari 2020 om 12:40 UTC](https://meta.discourse.org/t/unix-var-discourse-shared-standalone-nginx-http-sock-2-no-such-file-or-directory-solved/142342 "2020-02-22T12:40:30Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Mednosis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mednosis/32/175309_2.png) [@Mednosis](https://meta.discourse.org/u/Mednosis)\
**Post date:** [2 april 2020 om 00:29 UTC](https://meta.discourse.org/t/unix-var-discourse-shared-standalone-nginx-http-sock-2-no-such-file-or-directory-solved/142342/8 "2020-04-02T00:29:29Z")

</div>

I tried all above suggestion but still getting 502 bad gateway error. For now i am not using HTTPS.

Following is my error:

```
> 2020/04/02 00:17:54 [crit] 18599#18599: *1 connect() to unix:/var/discourse/shared/standalone/nginx.http.sock failed (2: No such file or directory) while connecting to upstream, client: xx.xxx.xxx.xx, server: talk.mydomain.com, request: "GET / HTTP/1.1", upstream: "http://unix:/var/discourse/shared/standalone/nginx.http.sock:/", host: "talk.mydomain.com"
> 
> 2020/04/02 00:17:54 [crit] 18599#18599: *1 connect() to unix:/var/discourse/shared/standalone/nginx.http.sock failed (2: No such file or directory) while connecting to upstream, client: xx.xxx.xxx.xx, server: talk.mydomain.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:/var/discourse/shared/standalone/nginx.http.sock:/favicon.ico", host: "talk.mydomain.com", referrer: "http://talk.mydomain.com/"

```

Following is my /etc/nginx/sites-enabled/discourse.conf file:

```
server {
        listen 80; listen [::]:80;
        server_name talk.mydomain.com;
        location / {
                proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock;
                proxy_set_header Host $http_host;
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Real-IP $remote_addr;
        }
}

```

Following is the template section of /var/discourse/containers/app.yml:

```
server {
        listen 80; listen [::]:80;
        server_name talk.mydomain.com;
        location / {
                proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock;
                proxy_set_header Host $http_host;
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Real-IP $remote_addr;
        }
}

```

Please advise.

---

_[View the full topic](https://meta.discourse.org/t/unix-var-discourse-shared-standalone-nginx-http-sock-2-no-such-file-or-directory-solved/142342)._
