我正在尝试反向代理子路径,域https://raspberrypi.local工作正常,但https://raspberrypi.local/gogs/返回 502 Bad Gateway。
这是文件:/etc/nginx/sites-available/gogs
更新时间: 2016 年 12 月 10 日
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;
}
/home/git/gogs/log/gogs.log 表明
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