打算部署网站 http 和 https 都可以访问 ssl 使用的是 namecheap 的 single domain 的服务,部署后 https 可以正常访问,但 http 访问不了
查看了 nginx log 信息如下: "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
可能是哪里出了问题,哪位大牛指导一下,多谢!
nginx 的配置:
server { listen 80; listen 443 ssl; server_name *******.com;
ssl_certificate /home/ubuntu/certificate.crt; ssl_certificate_key /home/ubuntu/certificate.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5:!DH;
root /home/ubuntu/edu/public; passenger_enabled on; rails_env production;
#charset koi8-r;
access_log logs/host.access.log; error_log logs/host.error.log warn;
location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; fastcgi_ignore_client_abort on; proxy_ignore_client_abort on; proxy_read_timeout 180; proxy_send_timeout 60; proxy_connect_timeout 120; } }