nginx 反向代理https设置成功,但是访问页面出现502 bad gate way?

  • 回答 (2)
  • 关注 (0)
  • 查看 (1558)

# root html;

# index index.html index.htm;

这两行开放了是可以访问的

配置如下:

# HTTPS server

#

server {

listen 443 ssl;

server_name www.liujianintellicreate.cn;

ssl on;

ssl_certificate 1_liujianintellicreate.cn_bundle.crt;

ssl_certificate_key 2_liujianintellicreate.cn.key;

ssl_session_timeout 5m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;

ssl_prefer_server_ciphers on;

proxy_http_version 1.1;

fastcgi_connect_timeout 300;

fastcgi_send_timeout 300;

fastcgi_read_timeout 300;

location / {

proxy_buffer_size 64k;

proxy_buffers 32 32k;

proxy_busy_buffers_size 128k;

proxy_set_header Host $host:&server_port;

proxy_pass http://127.0.0.1:8765;

# root html;

# index index.html index.htm;

}

}

用户1514971用户1514971提问于
Hey金子刚入行的小学生,打怪升级的漫漫长路回答于

出现502,问题很多,先查找nginx的日志文件,看看错误在哪把

Mongoing中文社区回答于

扫码关注云+社区

领取腾讯云代金券