欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > Nginx >内容正文

Nginx

ubuntu上Nginx的HTTPS enablement

发布时间:2023/12/19 Nginx 44 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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的原创文章,请关注公众号"汪子熙":

总结

以上是生活随笔为你收集整理的ubuntu上Nginx的HTTPS enablement的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。