Yes, here is the working configuration. The problem was pretty simple, it was that originally I tried to use a socket to serve the site, but this didn’t work, so I had to use a port.
server {
listen 801;
server_name 127.0.0.1;
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-Real-IP $remote_addr;
}
}