5
应用部署之nginx的https配置及自动生成证书
source link: https://muxiaobai.github.io/2020/10/30/%E5%BA%94%E7%94%A8%E9%83%A8%E7%BD%B2%E4%B9%8Bnginx%E7%9A%84https%E9%85%8D%E7%BD%AE%E5%8F%8A%E8%87%AA%E5%8A%A8%E7%94%9F%E6%88%90%E8%AF%81%E4%B9%A6/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
应用部署之nginx的https配置及自动生成证书
运行nginx -V命令查看已经安装的nginx模块
./configure –prefix=/usr/local/nginx –with-http_stub_status_module –with-http_ssl_module
需要添加ssl模块
make && make install
nginx 配置
server {
listen 8080;
listen 8443 ssl;
server_name localhost;
#ssl on;
root html/app-layui/src;
index login.html index.htm;
ssl_certificate ../cert/zhang.pem;
ssl_certificate_key ../cert/zhang.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;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index login.html login.thm;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
tomcat keytool 免费证书
win&linux 脚本
免费安全证书 1year
https://freessl.cn/
↑
坚持原创技术分享,您的支持将鼓励我继续创作!
坚持原创技术分享,您的支持将鼓励我继续创作!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK