0

I am trying to reverse proxy sub path , the domain https://raspberrypi.local works fine but https://raspberrypi.local/gogs/ is return ing 502 Bad Gateway.

This is the file: /etc/nginx/sites-available/gogs
Updated: 12-10-2016

server {
    listen 443 ssl;
    server_name raspberrypi.local;

    ssl_certificate /etc/ssl/localcerts/raspberrypi.local.crt;
    ssl_certificate_key /etc/ssl/localcerts/raspberrypi.local.key;

# taken out from location
# proxy_set_header X-Real-IP $remote_addr;

    location /gogs/ {
        proxy_pass http://localhost:3000/;
    }
}

# Redirect HTTP request to HTTPS

server {
    listen 80;
    server_name raspberrypi.local;
    return 301 https://$host$request_uri;
}

the /home/git/gogs/log/gogs.log shows that

2016/09/12 17:35:40 [I] Git Version: 2.1.4
2016/09/12 17:35:40 [I] Run Mode: Production
2016/09/12 17:35:43 [I] Listen: https://0.0.0.0:3000/gogs
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197

0 Answers0