Nginx服务器配置HTTPS nginx.config 配置文件(教程)
目录位置:
/usr/local/www/nginx/conf(仅供参考)
server { listen 443 ssl; server_name localhost; ssl_certificate server.crt; # cert.pem; ssl_certificate_key server.key; # cert.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { root /home/share; autoindex on; index index.html index.htm; } }
以上是公司服务器
检测配置文件没问题后重新读取 Nginx 即可
nginx -t && nginx -s reload 1 listen 443; 监听443端口 2 ssl on; 开启SSL模块 3 ssl_protocols SSLv2 SSLv3 TLSv1; 指定SSL使用协议 4 ssl_ciphers HIGH:!aNULL:!MD5; 指定加密方式 5 ssl_prefer_server_ciphers on; 配置依赖SSLv3和TLSv1协议的服务器密码将优先于客户端密码 6 ssl_session_timeout 10m; 设置会话超时时间 7 ssl_certificate xxx.cer; 配置证书 8 ssl_certificate_key xxx.key; 配置密钥
相关推荐
airfish000 2020-09-11
huangzonggui 2020-06-05
zhangwentaohh 2020-05-29
roddex00 2020-04-20
sanshamo 2020-03-27
furongwei 2020-03-26
zlsh00 2020-03-23
oLeiShen 2020-03-07
sapliang 2020-02-22
leodengzx 2020-01-31
meylovezn 2020-01-08
vanturman 2019-12-27
leodengzx 2019-12-27
leodengzx 2019-12-18
sapliang 2019-12-16
furongwei 2019-12-15
wq0 2019-12-14