如何重新加载让nginx中的加密

发布于 2025-02-02 01:48:12 字数 566 浏览 4 评论 0原文

我正在使用让我们加密生成HTTPS证书。该证书为3个月。

证书在NGINX中指定:

listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/mywebsite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mywebsite.com/privkey.pem;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

证书每3个月自动续订。要重新加载nginx,我只键入service nginx reload,以root连接。也许有更好的东西。

我尝试使用crontab -e作为root自动重新加载它,我补充说:

0 4 * * * service nginx reload 

但是它无能为力:--(我不明白我在做什么错...

我的服务器在Debian上

I'm using Let's encrypt to generate https certificate. This certificate is for 3 months.

The certificate is specified in Nginx:

listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/mywebsite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mywebsite.com/privkey.pem;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

The certificate is auto renew each 3 months. To reload in Nginx, I just type service nginx reload, connected as root. Maybe there is something better.

I've tried to auto reload it in Nginx, with crontab -e as root, I added:

0 4 * * * service nginx reload 

But it does nothing :-( I do not understand what I'm doing wrong...

My server is on Debian

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文