配置文件test.test.com.conf具体的站点配置如下:
# HTTPS server
server {
listen 80;
listen 443 ssl;
server_name test.test.com;
ssl on;
ssl_certificate /usr/local/nginx/certs/1_test.test.com_bundle.crt;
ssl_certificate_key /usr/local/nginx/certs/2_test.test.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
if ($server_port = 80 ) {
return 301 https://$host$request_uri;
}
location / {
proxy_pass http://www.8a.hk:3000;
}
#让http请求重定向到https请求
error_page 497 https://$host$request_uri;
}
Copyright © 2013-2024 8a.hk All Rights Reserved. 八艾云 版权所有 中山市八艾云计算有限公司 粤ICP备14095776号 粤公网安备 44200002445359号
增值电信业务经营许可证编号:B1-20222012
代理域名注册服务机构:西部数码