nginx配置ssl证书实现https访问详解程序员
2023-06-13 09:19:58 时间
server_name www.abc.lynch.com abc.lynch.com;
error_log /usr/share/nginx/html/test/pay_local.error;
client_max_body_size 60M;
client_body_buffer_size 512k;
location / {
root /usr/share/nginx/html/kshop;
index index.html;
autoindex on;
# rewrite ^(.*) https://$server_name$1 permanent;
server {
listen 443 ssl;
server_name www.abc.lynch.com abc.lynch.com;
error_log /usr/share/nginx/html/test/pay_local.error;
client_max_body_size 60M;
client_body_buffer_size 512k;
location / {
root /usr/share/nginx/html/kshop;
index index.html;
autoindex on;
ssl_certificate /etc/nginx/conf.d/fullchain.pem; #证书位置
ssl_certificate_key /etc/nginx/conf.d/privkey.pem; #私钥位置
}
server { listen 443 ssl; server_name www.erpshopmobilexmjservertest.xinyartech.com erpshopmobilexmjservertest.xinyartech.com; error_log /usr/share/nginx/html/test/pay_local.error; client_max_body_size 60M; client_body_buffer_size 512k; location / { proxy_pass http://172.16.92.254:8062; ssl_certificate /etc/nginx/conf.d/fullchain.pem; ssl_certificate_key /etc/nginx/conf.d/privkey.pem; }
2、启动nginx,映射443端口
docker run --restart=always --name nginx_erp_test -d -p 80:80 -p 443:443 -v /www/html/attachment:/www/html/attachment -v /data/nginx/html:/usr/share/nginx/html -v /data/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /data/nginx/logs:/var/log/nginx -v /data/nginx/conf.d:/etc/nginx/conf.d nginx
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/2135.html
服务器部署程序员系统优化网站设置运维相关文章
- https之ssl证书配置前端+后端(koa)
- Tomcat配置ssl协议及遇到的问题https页面无法访问
- nginx实现https网站设置(SSL证书生成配置)
- Nginx配置文件(nginx.conf)配置详解
- 腾讯云SSL证书_nginx反向代理配置证书
- Haproxy关于SSL的各种场景配置
- Apache配置ssl支持https
- debian9.9 apache2.4 站点添加ssl证书配置https
- nginx配置ssl证书实现https详解程序员
- MySQL Variables thread_handling 数据库 参数变量解释及正确配置使用
- MySQL:启用SSL加密安全(mysql开启ssl)
- Linux SSL 配置:站在安全可靠的基础上运行(linuxssl配置)
- 如何配置 MySQL SSL,提升数据传输安全性(mysqlssl配置)
- 实现快速建立Redis数据库:完整安装配置指南(redis数据库安装配置)
- MySQL中使用SSL出现问题的解决方法(mysql中ssl问题)
- 深入了解MySQL中SSL连接的必要性和配置方法(mysql中 ssl连接)
- 如何在MySQL中关闭SSL连接(mysql中ssl关闭)
- MySQL中SSL的配置和使用方法(mysql 中ssl)
- 使用redis配置不同版本号的实践(redis 配置版本号)