时间:2023-03-09来源:系统城装机大师作者:佚名
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
server { listen 443 ssl; server_name xxx.com; ssl_certificate cert/下载的pem后缀文件; ssl_certificate_key cert/下载的key后缀文件; ssl_session_timeout 120m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; location / { proxy_pass http: // 转发的路径(跟http一致)/; #proxy_set_header X-Real-IP $remote_addr; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #proxy_set_header Host $http_host; #proxy_set_header X-NginX-Proxy true; #由于nginx的反向代理,所以需要在这里将$remote_addr赋值给某一参数,系统通过该参数获取用户的访问ip,这里直接定义为:WL-Proxy-Client-IP proxy_set_header WL-Proxy-Client-IP $remote_addr; proxy_redirect default; } error_page 500 502 503 504 /50x .html; location = /50x .html { root html; } } |
至此nginx 配置https完成,如果配置不生效请检查下载的pem 跟key文件是否路径正确
执行nginx重启命令:systemctl restart nginx.service即可应用
2023-03-09
windows server2012上配置IIS全过程(附详细步骤)2023-03-09
Windows下使用 Nginx 搭建 HTTP文件服务器 实现文件下载功能2023-03-09
centos7安装zabbix 5.0的详细过程Tomcat报404问题解决 正确的情况 解决方法 1.Tomcat未配置环境变量 2.IIs访问权限问题 3.端口占用问题 4.文件缺少问题...
2023-03-09
今天编译安装nginx的时候想着要做rewrite功能,匆忙瞟了一眼编译文档就直接make&&make install了,然后再修改配置文件的时候一直报错,语法死活过不去。现在记录一下本次报错的情况。...
2023-03-09