I created a proxypass on my nginx server, and enabled ssl on it, but with and without ssl I still get an error saying 502 bad gateway. What can I fix to resolve this?(p.s. when I use curl on localhost 6060, it returns the correct html, so I know that works, however when I curl the url it redirects to, it throws Cannot GET /iwl
)
Nginx conf:
location /iwl {
proxy_pass http://localhost:6060;
proxy_ssl_trusted_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
}
Error log:
2019/01/17 12:29:57 [error] 1575#1575: *7 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: mysite.com, request: "GET /iwl HTTP/1.1", upstream: "http://127.0.0.1:6060/iwl", host: "mysite.com"
proxy_pass
line so:http://localhost:6060/;