Nginx配置https网站

不打扰是莪最后的温柔 提交于 2019-12-06 03:38:53

因为Nginx默认从conf目录搜索https证书,所以https证书一般存放到conf目录下。

#省略一些配置......http {    include        mime.types;    default_type   application/octet-stream;    sendfile       on;    keepalive_timeout  65;    charset   utf-8;    server {        listen  443;        server_name   www.3n6mu.org;        ssl   on;        ssl_certificate        cert/3n6mu.org.crt; # https证书        ssl_certificate_key    cert/3n6mu.org.key; # RSA私钥        ssl_session_timeout   5m;        ssl_protocols   TLSv1.2;        ssl_ciphers    HIGH:!aNULL:!MD5;        ssl_prefer_server_ciphers   on;        location / {            root   html;            index  index.html index.php;        }    }}#省略一些配置......

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!