网站加了ssl证书后,发现所有静态jsp页面都无法打开,chrome报ERR_EMPTY_RESPONSE
nginx日志
开始认为是内部调用http的事,
自己创建了个测试jsp页面,里面什么也没写,结果也打不开.再创建个HTML页面,可以打开.
nginx配置
server {
listen 80;
server_name xxxx.com www.xxxx.com;
location / {
proxy_pass http://127.0.0.1:18652;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log /var/log/nginx/www.xxxx.com.log;
}
}
# PC
server {
listen 443 ssl ;
server_name www.xxxx.com xxxx.com;
access_log /var/log/nginx/www.xxxx.com.log;
ssl_certificate /etc/nginx/conf.d/xxxx_cert/ServerCertificate.cer;
ssl_certificate_key /etc/nginx/conf.d/xxxx_cert/www.xxxx.com_key.txt;
ssl_trusted_certificate /etc/nginx/conf.d/xxxx_cert_bak/CACertificate-INTERMEDIATE-1.cer;
ssl_stapling off;
add_header Strict-Transport-Security max-age=16588800 always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Frame-Options SAMEORIGIN always;
add_header X-Content-Type-Options nosniff always;
add_header Cache-Control no-cache always;
include conf.d/safe/safe.conf;
location / {
proxy_pass http://127.0.0.1:18652;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log /var/log/nginx/www.xxxx.com.log;
}
}
已解决 最终是nginx配置问题
修改后的nginx conf文件