nginx (and caddy — doesn't matter which one)
environment: ubuntu 18.4.3 — Docker (docker-compose)
errors: connection reset by peer — Connection refused
when I link nginx/caddy to the container that I want to reverse proxy I get Connection refused
and when I use network_mode:host I get connection reset by peer
doesn't matter if it's nginx or caddy I get the same error.
nginx configurations:
upstream v2ray {
server 127.0.0.1:1080;
}
location /downloadstream {
proxy_pass http://v2ray;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_intercept_errors on;
if ($http_upgrade = "websocket" ) {
proxy_pass http://v2ray;
}
}
Caddyfile:
0.0.0.0:443
browse
log stdout
errors stdout
tls /root/certs/fullchain.pem /root/certs/privkey.pem
proxy /downloadstream 127.0.0.1:1080 {
websocket
header_upstream -Origin
}
something on the host environment must've been causing this. but I have no clue. can someone give me a hint?
I was struggling with Nginx & Caddy today as well 😅
ss -tulpn
Обсуждают сегодня