阅读 58

ubuntu上Nginx的HTTPS enablement

在/etc/nginx目录下的nginx.conf添加如下配置项目:
ssl_certificate cert/argame.pem;
ssl_certificate_key cert/argame.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;

nginx: [emerg] “ssl_certificate” directive is not allowed here in /etc/nginx/nginx.conf:75

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

最终效果:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

文章分类
后端
文章标签