Can someone explain me why "curl: (7) Failed to connect to 127.0.0.1 port 2000: Connection refused" ?
MarcoI
nginx-forum at forum.nginx.org
Wed May 13 09:52:26 UTC 2020
Hi!,
I do not understand why it says "curl: (7) Failed to connect to 127.0.0.1
port 2000: Connection refused" :
curl -X POST -F 'first_name=pinco' -F 'last_name=pallo' -F
'company_name=Company' -F 'email=pinco.pallo at company.com' -F 'tel=111111111'
127.0.0.1:2000/puser/add curl: (7) Failed to connect to 127.0.0.1 port 2000:
Connection refused.
In server-gorillamux.go : CONN_PORT = "2000"
in /etc/nginx/conf.d/default.conf :
upstream golang-webserver {
ip_hash;
server 127.0.0.1:2000;
}
server {
#listen 2999;
server_name ggc.world;
root /puser/add; // Is this correct?
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers
EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:50m;
location / {
#proxy_pass http://127.0.0.1:8080;
proxy_pass http://golang-webserver;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_set_header Host $host;
}
}
Looking forward to your kind help.
Marco
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,288019,288019#msg-288019
More information about the nginx
mailing list