本文章主要介绍了nginx1.15.10配置使用非https访问返回403,具有不错的的参考价值,希望对您有所帮助,如解说有误或未考虑完全的地方,请您留言指出,谢谢!
nginx版本号:nginx version: nginx/1.15.10
server { listen 443 default ssl; server_name app.test.com; if ($host != 'app.test.com'){ return 403; } ssl_certificate /usr/local/nginx/ssl/app.test.com.crt; ssl_certificate_key /usr/local/nginx/ssl/app.test.com.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; access_log logs/host.access.log; location / { proxy_pass http://127.0.0.1; } }
原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/228337.html