I’m experiencing an issue with my Nginx reverse proxy setup
My server log shows a successful start:
CopyINFO Starting server on 0.0.0.0:6060 (ws.domain.com).
Running ss -tuln confirms that it’s correctly listening on 0.0.0.0:6060.
However, when I try to access ws.domain.com, I get the following error:
Copy[error] 342#342: *27 connect() failed (111: Unknown error) while connecting to upstream, client: 172.16.0.106, server: ws.domain.com, request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:6060/”, host: ws.domain.com
It seems that while the server is running and listening on the correct port, Nginx is unable to establish a connection to the upstream server.
What could be causing this issue, and what steps should I take to troubleshoot and resolve it? Any help or suggestions would be greatly appreciated.
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[[services]]
internal_port = 6060
processes = ["reverb"]
[processes]
app = ""
queue = "php artisan queue:listen"
reverb = "php artisan reverb:start"
schedule = "cron -f"
server {
listen 8080;
listen [::]:8080;
server_name my.server;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:6060;
}
}
server {
listen 8080 default_server;
listen [::]:8080 default_server;
root /var/www/html/public;
index index.html index.htm index.php;
server_name _;
charset utf-8;
...