{"id":32742,"date":"2026-08-21T10:00:00","date_gmt":"2026-08-21T02:00:00","guid":{"rendered":"https:\/\/cn.hostease.com\/blog\/?p=32742"},"modified":"2026-08-22T19:30:11","modified_gmt":"2026-08-22T11:30:11","slug":"certbot-troubleshooting-server-ssl","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/blog\/guides\/certbot-troubleshooting-server-ssl\/","title":{"rendered":"Certbot \u8bc1\u4e66\u81ea\u52a8\u7eed\u671f\u6392\u969c\uff1a\u670d\u52a1\u5668 SSL \u90e8\u7f72\u4e0e\u7eed\u671f\u9a8c\u8bc1"},"content":{"rendered":"<p>\u90e8\u7f72\u597d HTTPS \u4e4b\u540e\uff0c\u5f88\u591a\u4eba\u4ee5\u4e3a\u914d\u7f6e\u4e86 Certbot \u5c31\u80fd&#8221;\u4e00\u52b3\u6c38\u9038&#8221;\uff0c\u7ed3\u679c\u51e0\u4e2a\u6708\u540e\u6d4f\u89c8\u5668\u7a81\u7136\u5f39\u51fa\u8bc1\u4e66\u8fc7\u671f\u8b66\u544a\uff0c\u624d\u53d1\u73b0\u81ea\u52a8\u7eed\u671f\u6084\u6084\u5931\u8d25\u4e86\u3002Certbot\uff08Let&#8217;s Encrypt \u5b98\u65b9\u63a8\u8350\u8bc1\u4e66\u5ba2\u6237\u7aef\uff09\u5185\u7f6e\u4e86 renew \u5b9a\u65f6\u7eed\u671f\u673a\u5236\uff0c\u4f46\u5b83\u7684\u9ed8\u8ba4\u7eed\u671f\u9891\u7387\u3001\u7aef\u53e3\u5360\u7528\u3001\u76ee\u5f55\u6743\u9650\u3001DNS\uff08Domain Name System\uff0c\u57df\u540d\u7cfb\u7edf\uff09\u89e3\u6790\u4efb\u4f55\u4e00\u4e2a\u73af\u8282\u51fa\u95ee\u9898\uff0c\u90fd\u4f1a\u8ba9\u8bc1\u4e66\u505c\u5728 90 \u5929\u6709\u6548\u671f\u8fb9\u7f18\u3002\u672c\u7bc7\u6587\u7ae0\u5c06\u6559\u4f60\u5982\u4f55\u4ece\u96f6\u7406\u6e05 Certbot \u81ea\u52a8\u7eed\u671f\u7684\u5b8c\u6574\u94fe\u8def\u3001\u5982\u4f55\u5b9a\u4f4d\u7eed\u671f\u5931\u8d25\u7684\u4e09\u7c7b\u6700\u5e38\u89c1\u6839\u56e0\uff0c\u5e76\u5982\u4f55\u7528\u4e00\u5f20\u6392\u67e5\u8868\u5728 10 \u5206\u949f\u5185\u89e3\u51b3\u81ea\u5df1\u7684\u8bc1\u4e66\u95ee\u9898\uff0c\u8ba9\u670d\u52a1\u5668 SSL \u8bc1\u4e66\u5728 90 \u5929\u5185\u7a33\u5b9a\u81ea\u52a8\u7eed\u671f\uff0c\u907f\u514d\u56e0\u8fc7\u671f\u5bfc\u81f4\u7684\u8bbf\u95ee\u4e2d\u65ad\u548c\u4fe1\u4efb\u635f\u5931\u3002SSL\uff08Secure Sockets Layer\uff0c\u5b89\u5168\u5957\u63a5\u5c42\uff0c\u7528\u4e8e\u52a0\u5bc6\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u901a\u4fe1\uff09\u8bc1\u4e66\u7684\u81ea\u52a8\u7eed\u671f\uff0c\u6b63\u662f\u4fdd\u969c HTTPS \u957f\u671f\u7a33\u5b9a\u7684\u5173\u952e\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cn.hostease.com\/blog\/wp-content\/uploads\/2026\/08\/certbot-troubleshooting-server-ssl-cover.webp\" alt=\"Certbot \u8bc1\u4e66\u81ea\u52a8\u7eed\u671f\u6392\u969c\u6d41\u7a0b\u4e0e SSL \u90e8\u7f72\u6838\u5fc3\u6982\u5ff5\u5c01\u9762\u56fe\" loading=\"lazy\" \/><\/p>\n<h2>Certbot \u81ea\u52a8\u7eed\u671f\u662f\u600e\u4e48\u8fd0\u884c\u7684<\/h2>\n<p>Let&#8217;s Encrypt \u7b7e\u53d1\u7684\u8bc1\u4e66\u9ed8\u8ba4\u6709\u6548\u671f\u4e3a 90 \u5929\uff0c\u8fd9\u662f\u5b83\u7684\u5b89\u5168\u8bbe\u8ba1\u2014\u2014\u7f29\u77ed\u6709\u6548\u671f\u4ee5\u964d\u4f4e\u79c1\u94a5\u6cc4\u9732\u5e26\u6765\u7684\u635f\u5931\u3002\u56e0\u6b64\u670d\u52a1\u5668\u5fc5\u987b\u5468\u671f\u6027\u7533\u8bf7\u65b0\u8bc1\u4e66\uff0c\u8fd9\u4e00\u8fc7\u7a0b\u79f0\u4e3a\u7eed\u671f\uff08renew\uff09\u3002Certbot \u9ed8\u8ba4\u5df2\u7ecf\u5b89\u88c5\u4e86\u7eed\u671f\u5b9a\u65f6\u673a\u5236\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5c1d\u8bd5\u5728\u5230\u671f\u524d\u5927\u7ea6 30 \u5929\u5185\u7eed\u671f\u8bc1\u4e66\uff0c\u800c\u4e0d\u662f\u7b49\u5230\u6700\u540e\u4e00\u5929\u3002<\/p>\n<p>Certbot \u5224\u65ad&#8221;\u662f\u5426\u9700\u8981\u7eed\u671f&#8221;\u7684\u4f9d\u636e\u662f\u8bc1\u4e66\u5269\u4f59\u5929\u6570\u3002\u5f53\u5269\u4f59\u5929\u6570\u5c0f\u4e8e\u7eed\u671f\u9608\u503c\u65f6\uff0c\u5b83\u624d\u4f1a\u771f\u6b63\u6267\u884c renew\uff1b\u5982\u679c\u8fd8\u8fdc\u6ca1\u5230\u65f6\u95f4\uff0crenew \u547d\u4ee4\u4f1a\u76f4\u63a5\u8fd4\u56de&#8221;\u6ca1\u6709\u9700\u8981\u7eed\u671f\u7684\u8bc1\u4e66&#8221;\uff0c\u8fd9\u662f\u4e00\u79cd\u6b63\u5e38\u72b6\u6001\uff0c\u4e0d\u4ee3\u8868\u5b9a\u65f6\u4efb\u52a1\u574f\u4e86\u3002<\/p>\n<p>\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u6240\u6709\u8bc1\u4e66\u53ca\u5176\u5230\u671f\u65f6\u95f4\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">\n # \u5217\u51fa\u670d\u52a1\u5668\u4e0a\u6240\u6709\u7531 Certbot \u7ba1\u7406\u7684\u8bc1\u4e66\nsudo certbot certificates\n<\/pre>\n<p>\u8f93\u51fa\u91cc\u4f1a\u663e\u793a\u6bcf\u4e2a\u57df\u540d\u7684\u8bc1\u4e66\u8def\u5f84\u3001\u5931\u6548\u65e5\u671f\uff08Expiry Date\uff09\uff0c\u4ee5\u53ca\u4f7f\u7528\u7684\u7eed\u671f\u914d\u7f6e\u3002\u793a\u4f8b\u8f93\u51fa\u4e2d\uff0c\u5982\u679c\u4f60\u7684\u8bc1\u4e66 Expiry Date \u663e\u793a\u4e3a 2026-11 \u524d\u540e\uff0c\u8bf4\u660e 8 \u6708\u5230\u671f\u540e\u5df2\u7ecf\u6b63\u5e38\u81ea\u52a8\u7eed\u671f\u8fc7\u4e00\u6b21\u3002<\/p>\n<h3>\u7eed\u671f\u5165\u53e3\uff1asystemd timer \u4e0e cron<\/h3>\n<p>Certbot \u7eed\u671f\u7531\u7cfb\u7edf\u5b9a\u65f6\u4efb\u52a1\u9a71\u52a8\u3002\u4e0d\u540c\u5b89\u88c5\u65b9\u5f0f\u5165\u53e3\u4e0d\u540c\uff0c\u5148\u786e\u8ba4\u81ea\u5df1\u7684\u7eed\u671f\u5165\u53e3\u662f\u5426\u5b58\u6d3b\uff0c\u8fd9\u662f\u6392\u969c\u7684\u7b2c\u4e00\u6b65\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">\n # systemd \u65b9\u5f0f\uff1a\u67e5\u770b certbot \u5b9a\u65f6\u5668\u6700\u8fd1\u4e00\u6b21\u8fd0\u884c\u65f6\u95f4\n systemctl list-timers | grep -i certbot\n\n # cron \u65b9\u5f0f\uff1a\u67e5\u770b crontab \u4e2d\u662f\u5426\u5305\u542b certbot renew\n crontab -l | grep -i certbot\n<\/pre>\n<p>\u5982\u679c\u4f7f\u7528 snap \u6216\u7cfb\u7edf\u5305\u7ba1\u7406\u5668\u5b89\u88c5\uff0c\u901a\u5e38\u8d70 systemd timer\uff1b\u5982\u679c\u624b\u52a8\u7528 crontab \u914d\u7f6e\uff0c\u7eed\u671f\u5165\u53e3\u662f cron \u5b9a\u65f6\u4efb\u52a1\u3002\u5224\u65ad\u6807\u51c6\u5f88\u7b80\u5355\uff1arenew \u547d\u4ee4\u672c\u8eab\u80fd\u4e0d\u80fd\u6b63\u786e\u6267\u884c\uff0c\u6bd4\u5b9a\u65f6\u4efb\u52a1\u6709\u6ca1\u6709\u5b58\u5728\u66f4\u91cd\u8981\u3002<\/p>\n<h2>\u7eed\u671f\u5931\u8d25\u7684\u5178\u578b\u539f\u56e0\u4e0e\u524d\u7f6e\u68c0\u67e5<\/h2>\n<p>\u7eed\u671f\u672c\u8d28\u4e0a\u662f Certbot \u5411 Let&#8217;s Encrypt \u91cd\u65b0\u53d1\u8d77\u4e00\u6b21 ACME\uff08\u81ea\u52a8\u8bc1\u4e66\u7ba1\u7406\u534f\u8bae\uff0cAutomated Certificate Management Environment\uff09\u9a8c\u8bc1\u8bf7\u6c42\u3002\u56e0\u6b64\u51e1\u662f\u5728&#8221;\u7b7e\u53d1\u8bc1\u4e66\u65f6\u80fd\u901a\u8fc7\u7684\u9a8c\u8bc1&#8221;\uff0c\u5728\u81ea\u52a8\u7eed\u671f\u65f6\u4e5f\u53ef\u80fd\u56e0\u4e3a\u73af\u5883\u53d8\u5316\u800c\u5931\u8d25\u3002\u4e0b\u9762\u662f\u6700\u5e38\u89c1\u7684\u56db\u7c7b\u539f\u56e0\uff1a<\/p>\n<ul>\n<li>\u7eed\u671f\u5165\u53e3\u6ca1\u6709\u5728\u8dd1\uff08timer \u88ab\u505c\u7528\u3001cron \u88ab\u79fb\u9664\uff09<\/li>\n<li>\u9a8c\u8bc1\u7aef\u53e3\u88ab\u5360\u7528\u6216\u9632\u706b\u5899\u62e6\u622a\uff08Nginx \u628a 80\/443 \u5360\u8d70\u4f46\u65b9\u5f0f\u4e0d\u5339\u914d\uff09<\/li>\n<li>DNS \u89e3\u6790\u53d8\u66f4\uff0c\u57df\u540d\u65e0\u6cd5\u6307\u5411\u5f53\u524d\u670d\u52a1\u5668<\/li>\n<li>\u90e8\u7f72\u7684 web \u670d\u52a1\u5728\u9a8c\u8bc1\u77ac\u95f4\u4e0d\u53ef\u7528<\/li>\n<\/ul>\n<p>\u5728\u52a8\u624b\u4fee\u590d\u524d\uff0c\u5148\u624b\u52a8\u6267\u884c\u4e00\u6b21\u8bd5\u8fd0\u884c\uff08dry-run\uff09\uff0c\u8fd9\u4e0d\u4f1a\u771f\u6b63\u7eed\u671f\uff0c\u53ea\u6a21\u62df\u9a8c\u8bc1\u6d41\u7a0b\uff0c\u662f\u5b89\u5168\u7684\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">\n # \u5e72\u8bd5\uff1a\u6a21\u62df renew \u6d41\u7a0b\uff0c\u4e0d\u5199\u5165\u8bc1\u4e66\n sudo certbot renew --dry-run\n<\/pre>\n<p>\u5982\u679c\u5e72\u8bd5\u901a\u8fc7\uff0c\u901a\u5e38\u610f\u5473\u7740\u73af\u5883\u6ca1\u95ee\u9898\uff0c\u95ee\u9898\u51fa\u5728\u5b9a\u65f6\u4efb\u52a1\u6ca1\u6709\u6309\u9884\u671f\u8fd0\u884c\uff1b\u5982\u679c\u5e72\u8bd5\u5931\u8d25\uff0c\u5c31\u8981\u6309\u4e0b\u9762\u7684\u9a8c\u8bc1\u65b9\u5f0f\u9010\u9879\u6392\u67e5\u3002<\/p>\n<h3>\u7528 Nginx \u9a8c\u8bc1\u4e0e DNS \u524d\u63d0<\/h3>\n<p>\u8bc1\u4e66\u7eed\u671f\u7684 HTTP \u9a8c\u8bc1\u4f9d\u8d56\u7f51\u7ad9\u80fd\u5bf9\u5916\u54cd\u5e94\u9a8c\u8bc1\u8bf7\u6c42\u3002\u5982\u679c\u7ad9\u70b9\u672c\u8eab\u5728 Nginx \u4e0a\u8fd0\u884c\uff0c\u5148\u786e\u8ba4 Nginx \u5df2\u542f\u52a8\u4e14\u5bf9\u5916\u76d1\u542c 80 \u7aef\u53e3\u3002\u5982\u679c\u670d\u52a1\u505c\u7740\uff0c\u5373\u4fbf\u8bc1\u4e66\u547d\u4ee4\u6b63\u786e\uff0cLet&#8217;s Encrypt \u670d\u52a1\u5668\u4e5f\u8bbf\u95ee\u4e0d\u5230\u4f60\u7684\u9a8c\u8bc1\u6587\u4ef6\u3002<\/p>\n<p>\u540c\u65f6\u8981\u786e\u8ba4\u57df\u540d\u89e3\u6790\uff08DNS\uff0cDomain Name System\uff0c\u57df\u540d\u7cfb\u7edf\uff0c\u8d1f\u8d23\u628a\u57df\u540d\u8f6c\u6362\u6210\u670d\u52a1\u5668 IP \u5730\u5740\uff09\u4ecd\u6307\u5411\u672c\u670d\u52a1\u5668\u516c\u7f51 IP\u3002\u57df\u540d\u642c\u5bb6\u3001\u6258\u7ba1\u670d\u52a1\u53d8\u66f4\u540e\u6700\u5bb9\u6613\u6f0f\u6389\u8fd9\u4e00\u6b65\u3002\u53ef\u4ee5\u7528\u7cfb\u7edf\u81ea\u5e26\u5de5\u5177\u67e5\u4e00\u4e0b\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">\n # \u67e5\u8be2\u57df\u540d\u89e3\u6790\uff0c\u5bf9\u6bd4\u662f\u5426\u6307\u5411\u5f53\u524d\u670d\u52a1\u5668\u516c\u7f51 IP\n dig +short your-domain.com A\n # \u5982\u679c\u8fd4\u56de\u7684\u4e0d\u662f\u672c\u673a IP\uff0c\u5148\u5904\u7406 DNS\n<\/pre>\n<p>\u5982\u679c\u7f51\u7ad9\u672c\u8eab\u5728\u8dd1 Nginx\uff0c\u7eed\u671f\u9a8c\u8bc1\u4e5f\u8981\u4f9d\u8d56 Nginx \u8f6c\u53d1\uff0c\u53ef\u4ee5\u53c2\u8003 Nginx \u53cd\u5411\u4ee3\u7406\u4e0e\u9650\u6d41\u914d\u7f6e\u76f8\u5173\u7684\u6392\u67e5\u7ecf\u9a8c\uff0c\u907f\u514d\u9a8c\u8bc1\u8bf7\u6c42\u88ab\u62e6\u622a\u3002\u4f8b\u5982\u914d\u7f6e\u9650\u6d41\u65f6\u7684 IP \u767d\u540d\u5355\u601d\u8def\uff0c\u540c\u6837\u9002\u7528\u4e8e\u653e\u884c ACME \u9a8c\u8bc1\u8def\u5f84\uff0c\u8be6\u89c1 <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/nginx-limit-req-rate-limiting\/\">Nginx \u8bf7\u6c42\u9650\u6d41\u914d\u7f6e<\/a>\u3002\u65e5\u5e38\u5185\u5bb9\u578b\u5185\u94fe\u4e5f\u53ef\u4ee5\u53c2\u8003 <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/nginx-cache-purge\/\">Nginx \u7f13\u5b58\u6e05\u7406\u4e0e\u56de\u6e90\u673a\u5236<\/a>\uff0c\u7406\u89e3\u9759\u6001\u8d44\u6e90\u5728\u7eed\u671f\u9a8c\u8bc1\u65f6\u662f\u5426\u4f1a\u88ab\u65e7\u7f13\u5b58\u5e72\u6270\u3002<\/p>\n<h2>\u4e09\u79cd\u9a8c\u8bc1\u65b9\u5f0f\u7684\u9009\u62e9\u4e0e\u7eed\u671f\u9002\u914d<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/cn.hostease.com\/blog\/wp-content\/uploads\/2026\/08\/certbot-troubleshooting-server-ssl-verification.webp\" alt=\"Webroot \u4e0e Standalone \u4e24\u79cd\u7eed\u671f\u9a8c\u8bc1\u65b9\u5f0f\u5bf9\u6bd4\" loading=\"lazy\" \/><\/p>\n<p>Certbot \u652f\u6301\u7684\u9a8c\u8bc1\u65b9\u5f0f\u76f4\u63a5\u51b3\u5b9a\u7eed\u671f\u80fd\u4e0d\u80fd\u81ea\u52a8\u5316\u3002\u6700\u5e38\u89c1\u7684\u6709 Webroot\u3001Standalone \u548c Nginx \u4e09\u79cd\uff0c\u6bcf\u4e00\u79cd\u5bf9\u7aef\u53e3\u548c web \u670d\u52a1\u7684\u8981\u6c42\u90fd\u4e0d\u540c\uff1a<\/p>\n<ul>\n<li>Webroot\uff1a\u5229\u7528\u5df2\u6709\u7684\u7ad9\u70b9\u6839\u76ee\u5f55\u653e\u7f6e\u9a8c\u8bc1\u6587\u4ef6\uff0c\u65e0\u9700\u5360\u7528\u989d\u5916\u7aef\u53e3\uff0c\u9002\u5408\u5df2\u6709 Nginx\/Apache \u5728\u76d1\u542c 80 \u7684\u573a\u666f<\/li>\n<li>Standalone\uff1a\u9a8c\u8bc1\u65f6\u7531 Certbot \u72ec\u7acb\u76d1\u542c 80\/443 \u7aef\u53e3\uff0c\u6b64\u65f6\u5fc5\u987b\u505c\u6b62\u5360\u7528\u7684 web \u670d\u52a1\uff0c\u5426\u5219\u7aef\u53e3\u51b2\u7a81<\/li>\n<li>Nginx\uff1a\u901a\u8fc7 Nginx \u63d2\u4ef6\u81ea\u52a8\u5b8c\u6210\u914d\u7f6e\u548c\u9a8c\u8bc1\uff0c\u9002\u5408\u7531 Certbot \u7edf\u4e00\u7ba1\u7406 Nginx \u914d\u7f6e\u7684\u573a\u666f<\/li>\n<\/ul>\n<div class=\"warning\">Standalone \u65b9\u5f0f\u81ea\u52a8\u7eed\u671f\u65f6\uff0c\u5982\u679c Nginx \u4ecd\u5728\u76d1\u542c 80\/443\uff0c\u4f1a\u76f4\u63a5\u62a5&#8221;\u7aef\u53e3\u88ab\u5360\u7528&#8221;\u9519\u8bef\u3002\u8fd9\u662f\u6700\u5e38\u89c1\u7684\u7eed\u671f\u5931\u8d25\u539f\u56e0\u4e4b\u4e00\u3002<\/div>\n<h3>\u7528 Webroot \u65b9\u5f0f\u7eed\u671f<\/h3>\n<p>\u5982\u679c\u4f60\u7684\u7ad9\u70b9\u662f Nginx \u627f\u8f7d\uff0c\u4e14\u5df2\u7ecf\u7ed1\u5b9a\u4e86\u57df\u540d\uff0c\u6700\u7a33\u59a5\u7684\u65b9\u5f0f\u662f\u7528 Webroot\u3002\u9996\u6b21\u7b7e\u53d1\u793a\u4f8b\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">\n # \u4f7f\u7528 Webroot \u65b9\u5f0f\u7533\u8bf7\u8bc1\u4e66\n sudo certbot certonly --webroot \\\n   -w \/var\/www\/your-site \\\n   -d your-domain.com\n<\/pre>\n<p>\u4e0a\u9762\u7684 <code>-w<\/code> \u6307\u5b9a web \u6839\u76ee\u5f55\uff0c<code>-d<\/code> \u6307\u5b9a\u57df\u540d\uff0cCerbot \u4f1a\u5728 <code>\/var\/www\/your-site\/.well-known\/acme-challenge\/<\/code> \u4e0b\u5199\u5165\u9a8c\u8bc1\u6587\u4ef6\u3002\u81ea\u52a8\u7eed\u671f\u65f6\u53ea\u8981\u8fd9\u4e2a\u76ee\u5f55\u53ef\u5199\u3001\u7f51\u7ad9\u80fd\u8bbf\u95ee\uff0c\u5c31\u4f1a\u987a\u5229\u5b8c\u6210\u3002<\/p>\n<h3>\u7528 Standalone \u65b9\u5f0f\u4e0e\u7aef\u53e3\u91ca\u653e<\/h3>\n<p>\u5982\u679c\u57df\u540d\u89e3\u6790\u5df2\u7ecf\u5c31\u7eea\uff0c\u4f46\u4e0d\u60f3\u5360\u7528 Webroot\uff0c\u53ef\u4ee5\u6539\u7528 Standalone\u3002\u81ea\u52a8\u7eed\u671f\u65f6\u52a1\u5fc5\u5728\u5b9a\u65f6\u811a\u672c\u4e2d\u5148\u505c web \u670d\u52a1\u518d\u6267\u884c\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">\n # \u505c\u6b62 Nginx \u518d\u6267\u884c\u5e72\u8bd5\uff08\u793a\u4f8b\uff0c\u6309\u5b9e\u9645\u670d\u52a1\u8c03\u6574\uff09\n sudo systemctl stop nginx\n sudo certbot renew --dry-run\n sudo systemctl start nginx\n<\/pre>\n<p>\u5982\u679c\u4f60\u7684\u7ad9\u70b9\u4f9d\u8d56 Redis \u7f13\u5b58\u3001Nginx \u914d\u7f6e\u7b49\u8054\u52a8\u670d\u52a1\uff0c\u5efa\u8bae\u5148\u4e86\u89e3 <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/redis-persistence-recovery\/\">Redis \u6301\u4e45\u5316\u4e0e\u6062\u590d<\/a>\uff0c\u907f\u514d\u5728\u6539\u9a8c\u8bc1\u65b9\u5f0f\u65f6\u8bef\u4f24\u7f13\u5b58\u6570\u636e\u3002\u540c\u65f6\uff0c\u5728\u505a\u670d\u52a1\u5668\u8fc1\u79fb\u6216\u914d\u7f6e\u5907\u4efd\u524d\uff0c\u53ef\u4ee5\u53c2\u8003 <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/restic-practical\/\">Restic \u589e\u91cf\u5907\u4efd\u5b9e\u8df5<\/a> \u5148\u4fdd\u4f4f\u8bc1\u4e66\u4e0e\u79c1\u94a5\u526f\u672c\u3002<\/p>\n<h2>\u7eed\u671f\u5931\u8d25\u5feb\u901f\u6392\u67e5\u8868<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/cn.hostease.com\/blog\/wp-content\/uploads\/2026\/08\/certbot-troubleshooting-server-ssl-troubleshooting.webp\" alt=\"\u7eed\u671f\u5931\u8d25\u6392\u67e5\u4e0e\u4fee\u590d\u6b65\u9aa4\u6d41\u7a0b\u56fe\" loading=\"lazy\" \/><\/p>\n<p>\u4e3a\u4e86\u628a\u5e38\u89c1\u62a5\u9519\u548c\u4fee\u590d\u5bf9\u9f50\uff0c\u4e0b\u9762\u6574\u7406\u4e00\u5f20\u53ef\u76f4\u63a5\u5bf9\u7167\u7684\u6392\u67e5\u8868\u3002\u793a\u4f8b\u4e2d\u7684 IP \u4e0e\u57df\u540d\u5747\u4e3a\u793a\u4f8b\u6570\u636e\uff0c\u8bf7\u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u7684\u771f\u5b9e\u503c\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u62a5\u9519\u7247\u6bb5<\/th>\n<th>\u5178\u578b\u539f\u56e0<\/th>\n<th>\u4fee\u590d\u65b9\u5411<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>&#8220;Failed to connect to &#8230; port 80&#8221;<\/td>\n<td>\u9632\u706b\u5899\u6216 Nginx \u672a\u76d1\u542c 80<\/td>\n<td>\u5f00\u653e 80\/443 \u7aef\u53e3\uff0c\u786e\u8ba4 Nginx \u542f\u52a8<\/td>\n<\/tr>\n<tr>\n<td>&#8220;403 Forbidden&#8221;<\/td>\n<td>Webroot \u76ee\u5f55\u65e0\u5199\u6743\u9650\u6216\u7981\u6b62\u8bbf\u95ee<\/td>\n<td>\u68c0\u67e5 <code>.well-known<\/code> \u76ee\u5f55\u6743\u9650\u4e0e Nginx \u4f4d\u7f6e\u5757<\/td>\n<\/tr>\n<tr>\n<td>&#8220;DNS problem: NXDOMAIN&#8221;<\/td>\n<td>\u57df\u540d\u89e3\u6790\u5931\u8d25\u6216\u4e0d\u5b58\u5728<\/td>\n<td>\u68c0\u67e5 DNS\uff0c\u7b49\u5f85\u751f\u6548\u6216\u4fee\u6b63\u89e3\u6790\u8bb0\u5f55<\/td>\n<\/tr>\n<tr>\n<td>&#8220;invalid response&#8221;<\/td>\n<td>\u9a8c\u8bc1\u6587\u4ef6\u672a\u6309\u9884\u671f\u8fd4\u56de<\/td>\n<td>\u786e\u8ba4 <code>-w<\/code> \u4e0e <code>-d<\/code> \u5bf9\u5e94\uff0c\u6216\u6539\u7528 Standalone<\/td>\n<\/tr>\n<tr>\n<td>&#8220;Too many requests&#8221;<\/td>\n<td>\u77ed\u65f6\u95f4\u53cd\u590d\u7533\u8bf7\u6b21\u6570\u8fc7\u591a<\/td>\n<td>\u7b49\u5f85\u5e76\u4f18\u5148\u7528 <code>--dry-run<\/code> \u6d4b\u8bd5<\/td>\n<\/tr>\n<tr>\n<td>&#8220;Port 80 already in use&#8221;<\/td>\n<td>Standalone \u4e0e Nginx \u51b2\u7a81<\/td>\n<td>\u7eed\u671f\u524d\u5148\u505c\u6b62\u5360\u7528\u7684 web \u670d\u52a1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u8ba9\u81ea\u52a8\u7eed\u671f\u7a33\u5b9a\u843d\u5730\u7684\u51e0\u6761\u5efa\u8bae<\/h2>\n<p>\u624b\u52a8\u9a8c\u8bc1\u901a\u8fc7\u540e\uff0c\u8981\u786e\u4fdd\u81ea\u52a8\u7eed\u671f\u957f\u671f\u53ef\u9760\uff0c\u6709\u51e0\u70b9\u5efa\u8bae\uff1a<\/p>\n<ul>\n<li>\u7528 <code>certbot renew --deploy-hook<\/code> \u5728\u7eed\u671f\u6210\u529f\u540e\u81ea\u52a8\u91cd\u8f7d Nginx\uff0c\u8bc1\u4e66\u66f4\u65b0\u540e\u4e0d\u91cd\u8f7d\u670d\u52a1\u4f1a\u7ee7\u7eed\u7528\u65e7\u8bc1\u4e66<\/li>\n<li>\u6bcf\u6b21\u8bc1\u4e66\u7eed\u671f\u540e\u786e\u8ba4 <code>ssl_certificate<\/code> \u4e0e <code>ssl_certificate_key<\/code> \u7684\u8def\u5f84\u4ecd\u6307\u5411 <code>\/etc\/letsencrypt\/live\/<\/code> \u4e0b\u7684\u7b26\u53f7\u94fe\u63a5<\/li>\n<li>\u628a <code>certbot renew<\/code> \u4e0e\u9a8c\u8bc1\u76d1\u63a7\u5206\u5f00\uff0c\u907f\u514d\u9632\u706b\u5899\u89c4\u5219\u628a\u9a8c\u8bc1\u8bf7\u6c42\u4e00\u5e76\u62e6\u622a<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u7ed9\u51fa\u4e00\u4e2a\u7ed9\u5b9a\u65f6\u4efb\u52a1\u52a0\u4e0a deploy-hook \u7684\u793a\u4f8b\u914d\u7f6e\uff08Nginx \u91cd\u8f7d\u547d\u4ee4\u4ee5\u5b9e\u9645\u73af\u5883\u4e3a\u51c6\uff09\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">\n # \u5728\u7eed\u671f\u6210\u529f\u540e\u81ea\u52a8\u91cd\u8f7d Nginx\uff0c\u793a\u4f8b\u914d\u7f6e\n sudo certbot renew --deploy-hook \"systemctl reload nginx\"\n<\/pre>\n<h3>\u8bc1\u4e66\u5230\u671f\u524d 30 \u5929\u4e0e\u63d0\u524d\u9884\u8b66<\/h3>\n<p>\u9664\u4e86\u4f9d\u8d56 Certbot \u5185\u7f6e\u903b\u8f91\uff0c\u4e5f\u53ef\u4ee5\u81ea\u5df1\u52a0\u4e00\u9053\u9632\u7ebf\u3002\u6bd4\u5982\u7528\u811a\u672c\u76d1\u63a7\u8bc1\u4e66\u5269\u4f59\u5929\u6570\uff0c\u4f4e\u4e8e 30 \u5929\u65f6\u8f93\u51fa\u544a\u8b66\uff0c\u907f\u514d\u56e0\u5b9a\u65f6\u5668\u6682\u505c\u800c\u957f\u65f6\u95f4\u65e0\u611f\u77e5\u3002\u5230\u671f\u524d\u670d\u52a1\u5668\u5982\u9047\u91cd\u542f\u3001\u914d\u7f6e\u6539\u52a8\uff0c\u4e5f\u53ef\u4ee5\u5728\u7eed\u671f\u524d\u590d\u67e5\u7aef\u53e3\u4e0e DNS\uff0c\u628a\u6392\u67e5\u6210\u672c\u964d\u5230\u6700\u4f4e\u3002<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>Certbot \u81ea\u52a8\u7eed\u671f\u5931\u8d25\u901a\u5e38\u4e0d\u662f\u8bc1\u4e66\u672c\u8eab\u7684\u95ee\u9898\uff0c\u800c\u662f\u9a8c\u8bc1\u94fe\u8def\u3001\u7aef\u53e3\u3001DNS \u6216\u5b9a\u65f6\u4efb\u52a1\u7b49\u524d\u7f6e\u6761\u4ef6\u88ab\u7834\u574f\u3002\u5efa\u8bae\u6309\u4ee5\u4e0b\u987a\u5e8f\u68c0\u67e5\uff1a\u5148\u7528 <code>certbot certificates<\/code> \u770b\u5f53\u524d\u4f59\u671f\uff0c\u518d\u7528 <code>certbot renew --dry-run<\/code> \u5b89\u5168\u9a8c\u8bc1\u6d41\u7a0b\uff0c\u786e\u8ba4\u89e3\u6790\u4e0e\u76d1\u542c\u7aef\u53e3\u6b63\u5e38\uff0c\u6700\u540e\u68c0\u67e5 Nginx \u914d\u7f6e\u4e0e\u5b9a\u65f6\u4efb\u52a1\u662f\u5426\u5b58\u6d3b\u3002\u53ea\u8981\u8fd9\u4e09\u4e2a\u73af\u8282\u901a\u7545\uff0c\u4f60\u7684\u670d\u52a1\u5668 SSL \u8bc1\u4e66\u5c31\u80fd\u5728 90 \u5929\u5185\u81ea\u52a8\u7eed\u671f\uff0c\u907f\u514d\u56e0\u8bc1\u4e66\u8fc7\u671f\u5bfc\u81f4\u7684\u4fe1\u4efb\u4e2d\u65ad\u3002\u5982\u679c\u4f60\u9700\u8981\u4e00\u53f0\u7a33\u5b9a\u627f\u8f7d\u591a\u57df\u540d HTTPS \u4e0e\u9ad8\u5e76\u53d1\u7684\u6d77\u5916\u670d\u52a1\u5668\uff0cHostease \u63d0\u4f9b\u7684 <a href=\"https:\/\/cn.hostease.com\/vps\/\">VPS<\/a>\uff08Virtual Private Server\uff0c<a href=\"https:\/\/cn.hostease.com\/vps\/\">\u865a\u62df\u4e13\u7528\u670d\u52a1\u5668<\/a>\uff09\u4e0e<a href=\"https:\/\/cn.hostease.com\/dedicated-server\/\">\u72ec\u7acb\u670d\u52a1\u5668<\/a>\u65b9\u6848\u53ef\u4ee5\u6ee1\u8db3\u90e8\u7f72\u9700\u6c42\uff0c\u4f46\u8bc1\u4e66\u7eed\u671f\u73af\u8282\u4ecd\u5efa\u8bae\u6309\u672c\u6587\u6e05\u5355\u5b9a\u671f\u5de1\u68c0\uff0c\u786e\u4fdd\u7ad9\u70b9\u957f\u671f\u53ef\u7528\u3002<\/p>\n<p>\u5982\u4f60\u7528\u7684\u662f Nginx \u53cd\u4ee3\u67b6\u6784\uff0c\u4e5f\u53ef\u7ed3\u5408 <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/nginx-limit-req-rate-limiting\/\">Nginx \u9650\u6d41\u914d\u7f6e<\/a> \u4e0e <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/nginx-cache-purge\/\">\u7f13\u5b58\u6e05\u7406<\/a> \u4e00\u8d77\u505a\u5468\u671f\u5de1\u68c0\uff0c\u786e\u4fdd\u9a8c\u8bc1\u8bf7\u6c42\u4e0d\u88ab\u5f02\u5e38\u7b56\u7565\u5e72\u6270\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8be6\u89e3 Certbot \u81ea\u52a8\u7eed\u671f\u539f\u7406\uff0c\u6574\u7406 Let&#8217;s Encrypt \u7eed\u671f\u5931\u8d25\u5e38\u89c1\u539f\u56e0\u4e0e\u4fee\u590d\u547d\u4ee4\u3001HTTP\/Webroot\/Standalone \u9a8c\u8bc1\u65b9\u5f0f\u53ca\u6392\u67e5\u8868\u683c\uff0c\u5e2e\u52a9\u7ad9\u957f\u7a33\u5b9a\u7ba1\u7406\u670d\u52a1\u5668 SSL \u8bc1\u4e66\u3002<\/p>\n","protected":false},"author":2,"featured_media":32739,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3822],"tags":[4899,4259,393,162,4900],"class_list":["post-32742","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-certbot","tag-letsencrypt","tag-nginx","tag-ssl","tag-4900"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/cn.hostease.com\/blog\/wp-content\/uploads\/2026\/08\/certbot-troubleshooting-server-ssl-cover.webp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/32742","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/comments?post=32742"}],"version-history":[{"count":1,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/32742\/revisions"}],"predecessor-version":[{"id":32743,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/32742\/revisions\/32743"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/media\/32739"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/media?parent=32742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/categories?post=32742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/tags?post=32742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}