nginx 配置443 域名

1 申请域名 (公有云)
2 下载证书 pem key 并上传服务器指定目录
3 公有云上做A记录解析 (解析到代理的nginx)
4 nginx配置443模块

配置内容:

server {
listen 80;
server_name softwaretest.ysjwproduction.com;
rewrite ^(.*)$ https://$host$1 permanent;
}

 

server {
listen 443 ssl;
server_name softretest.ysjwproduction.com;
ssl_certificate /opt/cert/9093999_softretest.ysjwproduction.com.pem;
ssl_certificate_key /opt/cert/9093999_softretest.ysjwproduction.com.key;

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 120m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

# ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://127.0.0.1:8083;
proxy_set_header WL-Proxy-Client-IP $remote_addr;
# proxy_redirect default;
# root html;
# index index.html index.htm;
}
}

 

 



5 重启nginx 并访问

 

posted @   哦~杰克  阅读(671)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
点击右上角即可分享
微信分享提示