502 error Bad Gateway after installing reverse proxy

0

I have installed the reverse proxy with this config file in /etc/nginx/sites-available:

server { listen 80; listen [::]:80; server_name example.com;

location /drivers   {

    proxy_pass http://127.0.0.1:5000;
    proxy_redirect http://127.0.0.1:5000/ http://example.com/drivers/ ;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade" ;
    proxy_read_timeout 20d ;
    proxy_buffering off ;
}

}

When accessing http://127.0.0.1:5000, everything is working fine. But http://example.com/drivers leads to 502 error

Thanks a lot for your help

posta un anno fa64 visualizzazioni
Nessuna risposta

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande