{"id":101563,"date":"2026-09-07T00:36:46","date_gmt":"2026-09-06T16:36:46","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/101563.html"},"modified":"2026-09-07T00:36:46","modified_gmt":"2026-09-06T16:36:46","slug":"debian-nginx-%e9%85%8d%e7%bd%ae%e5%ae%9e%e6%88%98%ef%bc%9ahttps%e3%80%81%e9%87%8d%e5%ae%9a%e5%90%91%e3%80%81%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e4%b8%8e%e7%9c%9f%e5%ae%9e-ip","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/101563.html","title":{"rendered":"Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP"},"content":{"rendered":"<h2>Debian Nginx \u914d\u7f6e\u5b9e\u6218&#xff1a;HTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP<\/h2>\n<\/p>\n<h3>1. \u670d\u52a1\u4ecb\u7ecd<\/h3>\n<\/p>\n<p>Nginx \u662f\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u548c\u53cd\u5411\u4ee3\u7406&#xff0c;\u5e38\u7528\u4e8e\u53d1\u5e03\u9759\u6001\u7f51\u9875\u3001\u627f\u8f7d HTTPS \u5165\u53e3\u3001\u8f6c\u53d1\u540e\u7aef\u5e94\u7528\u3001\u9690\u85cf\u540e\u7aef\u62d3\u6251\u3001\u7f13\u5b58\u54cd\u5e94\u548c\u7edf\u4e00\u8bb0\u5f55\u8bbf\u95ee\u65e5\u5fd7\u3002\u672c\u6587\u4ee5 Debian \u73af\u5883\u4e3a\u4f8b&#xff0c;\u4e32\u8054\u8bc1\u4e66\u7533\u8bf7\u3001HTTPS \u7ad9\u70b9\u3001HTTP \u81ea\u52a8\u8df3\u8f6c\u3001\u7248\u672c\u53f7\u9690\u85cf\u3001\u9759\u6001\u9875\u9762\u3001HTTPS \u53cd\u5411\u4ee3\u7406\u3001\u771f\u5b9e\u5ba2\u6237\u7aef IP \u548c\u9875\u9762\u7f13\u5b58\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p>Nginx \u53ef\u4ee5\u5de5\u4f5c\u5728 Web \u670d\u52a1\u5c42&#xff0c;\u4e5f\u53ef\u4ee5\u53ea\u4f5c\u4e3a\u4ee3\u7406\u5165\u53e3\u3002\u5b83\u4e0d\u4f1a\u81ea\u52a8\u66ff\u4ee3\u540e\u7aef Apache\u3001PHP-FPM \u6216\u4e1a\u52a1\u5e94\u7528&#xff1b;\u914d\u7f6e\u5b8c\u6210\u540e\u5fc5\u987b\u5206\u522b\u9a8c\u8bc1 Nginx \u672c\u8eab\u3001\u4ee3\u7406\u8fde\u63a5\u3001\u540e\u7aef\u54cd\u5e94\u548c\u65e5\u5fd7\u5b57\u6bb5\u3002<\/p>\n<\/p>\n<h3>2. \u51c6\u5907\u8fd0\u884c\u73af\u5883<\/h3>\n<\/p>\n<p>\u2022 **\u7cfb\u7edf**&#xff1a;Debian \u7cfb Linux&#xff1b;\u539f\u5b9e\u9a8c\u8bb0\u5f55\u4e3a Debian 10\u3001Linux 4.19 \u5185\u6838\u3002<\/p>\n<p>\u2022 **\u6743\u9650**&#xff1a;root \u6216\u5177\u5907 sudo \u6743\u9650\u7684\u7ba1\u7406\u5458\u8d26\u53f7\u3002<\/p>\n<p>\u2022 **\u89d2\u8272**&#xff1a;Nginx Server \u5bf9\u5916\u63d0\u4f9b HTTP\/HTTPS&#xff1b;\u5fc5\u8981\u65f6\u53e6\u6709 CA\u3001Apache\u3001Nginx \u6216\u5e94\u7528\u540e\u7aef&#xff1b;\u5ba2\u6237\u7aef\u4f7f\u7528 curl \u6216\u6d4f\u89c8\u5668\u9a8c\u8bc1\u3002<\/p>\n<p>\u2022 **\u8f6f\u4ef6**&#xff1a;\u5b89\u88c5 nginx\u3001openssl&#xff1b;\u5982\u4f7f\u7528 Easy-RSA \u6216\u72ec\u7acb CA&#xff0c;\u8fd8\u8981\u51c6\u5907\u5bf9\u5e94\u5de5\u5177\u548c\u7b7e\u53d1\u6743\u9650\u3002<\/p>\n<p>\u2022 **\u57df\u540d**&#xff1a;\u51c6\u5907\u5b9e\u9645\u57df\u540d\u548c DNS \u8bb0\u5f55\u3002\u672c\u6587\u4f7f\u7528 &lt;server-name&gt;\u3001&lt;backend-server&gt; \u7b49\u5360\u4f4d\u7b26&#xff0c;\u53d1\u5e03\u65f6\u4e0d\u8981\u7167\u6284\u4e3a\u771f\u5b9e\u5730\u5740\u3002<\/p>\n<p>\u2022 **\u7f51\u7edc**&#xff1a;\u5f00\u653e TCP 80\/443&#xff1b;\u53cd\u5411\u4ee3\u7406\u573a\u666f\u8fd8\u8981\u786e\u4fdd Nginx \u5230\u540e\u7aef\u670d\u52a1\u7aef\u53e3\u53ef\u8fbe\u3002<\/p>\n<p>\u2022 **\u8bc1\u4e66**&#xff1a;\u51c6\u5907\u670d\u52a1\u7aef\u79c1\u94a5\u3001\u8bc1\u4e66\u548c\u5b8c\u6574\u8bc1\u4e66\u94fe\u3002\u79c1\u94a5\u6743\u9650\u5e94\u4e25\u683c\u9650\u5236&#xff0c;\u4e0d\u8981\u4e0a\u4f20\u79c1\u94a5\u6216\u771f\u5b9e\u5bc6\u7801\u3002<\/p>\n<p>\u2022 **\u76ee\u5f55**&#xff1a;\u786e\u8ba4\u7ad9\u70b9\u6839\u76ee\u5f55\u3001\u65e5\u5fd7\u76ee\u5f55\u3001\u7f13\u5b58\u76ee\u5f55\u7684\u5c5e\u4e3b\u548c\u6743\u9650&#xff1b;\u7981\u6b62\u7528 chmod 777 \u4ee3\u66ff\u6743\u9650\u89c4\u5212\u3002<\/p>\n<p>\u2022 **\u5907\u4efd**&#xff1a;\u4fee\u6539 \/etc\/nginx\/nginx.conf \u548c sites-available \u914d\u7f6e\u524d\u5148\u5907\u4efd&#xff0c;\u5e76\u4f7f\u7528 nginx -t \u68c0\u67e5\u8bed\u6cd5\u3002<\/p>\n<\/p>\n<h3>3. \u76f8\u5173\u77e5\u8bc6<\/h3>\n<\/p>\n<p>\u2022 server \u6839\u636e\u76d1\u542c\u5730\u5740\u3001\u7aef\u53e3\u548c server_name \u5339\u914d\u8bf7\u6c42&#xff1b;\u591a\u4e2a\u7ad9\u70b9\u5171\u7528 80\/443 \u65f6&#xff0c;\u57df\u540d\u548c\u9ed8\u8ba4\u7ad9\u70b9\u987a\u5e8f\u4f1a\u5f71\u54cd\u5339\u914d\u7ed3\u679c\u3002<\/p>\n<p>\u2022 HTTP \u8df3\u8f6c\u4f18\u5148\u4f7f\u7528 return 301 https:\/\/$host$request_uri;&#xff0c;\u6bd4\u590d\u6742 rewrite \u66f4\u76f4\u89c2\u3002\u4e34\u65f6\u6d4b\u8bd5\u53ef\u4f7f\u7528 302&#xff0c;\u786e\u8ba4\u65e0\u8bef\u540e\u518d\u4f7f\u7528 301\u3002<\/p>\n<p>\u2022 server_tokens off \u53ea\u9690\u85cf Nginx \u7248\u672c\u53f7&#xff0c;\u4e0d\u80fd\u66ff\u4ee3\u8865\u4e01\u66f4\u65b0\u3001WAF\u3001\u8bbf\u95ee\u63a7\u5236\u548c\u9519\u8bef\u9875\u9762\u6cbb\u7406\u3002<\/p>\n<p>\u2022 \u53cd\u5411\u4ee3\u7406\u8981\u6b63\u786e\u4f20\u9012 Host\u3001\u5ba2\u6237\u7aef\u5730\u5740\u548c\u534f\u8bae\u3002$proxy_add_x_forwarded_for \u4f1a\u5728\u5df2\u6709 X-Forwarded-For \u57fa\u7840\u4e0a\u8ffd\u52a0\u5730\u5740&#xff1b;\u540e\u7aef\u53ea\u6709\u5728\u4fe1\u4efb\u4ee3\u7406\u6765\u6e90\u65f6\u624d\u5e94\u4f7f\u7528\u8be5\u5b57\u6bb5\u4f5c\u4e3a\u771f\u5b9e IP\u3002<\/p>\n<p>\u2022 HTTPS \u4ee3\u7406\u5230 HTTPS \u540e\u7aef\u65f6&#xff0c;\u8981\u8003\u8651 SNI \u548c\u8bc1\u4e66\u6821\u9a8c\u3002proxy_ssl_server_name on \u89e3\u51b3 SNI \u4f20\u9012&#xff0c;\u751f\u4ea7\u73af\u5883\u8fd8\u5e94\u914d\u7f6e\u53ef\u4fe1 CA \u548c\u8bc1\u4e66\u9a8c\u8bc1&#xff0c;\u4e0d\u80fd\u957f\u671f\u4f9d\u8d56 proxy_ssl_verify off\u3002<\/p>\n<p>\u2022 proxy_cache \u9002\u5408\u7f13\u5b58\u660e\u786e\u53ef\u7f13\u5b58\u7684 GET\/HEAD \u54cd\u5e94&#xff1b;\u767b\u5f55\u6001\u3001\u5199\u8bf7\u6c42\u548c\u4e2a\u6027\u5316\u5185\u5bb9\u4e0d\u8981\u76f4\u63a5\u7f13\u5b58\u3002\u7f13\u5b58\u952e\u81f3\u5c11\u8981\u8003\u8651 Host\u3001URI\u3001\u67e5\u8be2\u53c2\u6570\u548c\u534f\u8bae\u3002<\/p>\n<p>\u2022 Nginx \u65e5\u5fd7\u4e2d\u7684 $remote_addr \u53ef\u80fd\u662f\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740&#xff1b;\u540e\u7aef\u8bb0\u5f55 $http_x_forwarded_for \u524d&#xff0c;\u5fc5\u987b\u9650\u5236\u53ef\u4fe1\u4ee3\u7406&#xff0c;\u5426\u5219\u5ba2\u6237\u7aef\u53ef\u4ee5\u4f2a\u9020\u8be5\u8bf7\u6c42\u5934\u3002<\/p>\n<p>\u2022 \u4fee\u6539\u914d\u7f6e\u540e\u5148 nginx -t&#xff0c;\u518d systemctl reload nginx\u3002reload \u5931\u8d25\u65f6\u65e7 worker \u53ef\u80fd\u7ee7\u7eed\u670d\u52a1&#xff0c;\u5fc5\u987b\u67e5\u770b\u8fd4\u56de\u7801\u548c\u9519\u8bef\u65e5\u5fd7\u3002<\/p>\n<\/p>\n<h3>4. \u5b9e\u9a8c\u6b65\u9aa4<\/h3>\n<\/p>\n<h4>4.1 \u68c0\u67e5\u7cfb\u7edf\u5e76\u5b89\u88c5 Nginx<\/h4>\n<\/p>\n<p>uname -a<br \/>\napt update<br \/>\napt install -y nginx openssl<br \/>\nsystemctl enable &#8211;now nginx<\/p>\n<p>\u786e\u8ba4 Nginx \u7248\u672c\u548c\u670d\u52a1\u72b6\u6001&#xff1a;<\/p>\n<\/p>\n<p>nginx -v<br \/>\nsystemctl is-active nginx<\/p>\n<h4>4.2 \u751f\u6210\u670d\u52a1\u7aef\u5bc6\u94a5\u548c\u8bc1\u4e66\u8bf7\u6c42<\/h4>\n<\/p>\n<p>\u5728 Nginx Server \u4e0a\u751f\u6210\u79c1\u94a5\u548c CSR\u3002\u751f\u4ea7\u73af\u5883\u5e94\u4f7f\u7528\u4f01\u4e1a CA \u6216\u53d7\u4fe1\u4efb\u8bc1\u4e66\u673a\u6784&#xff0c;\u5e76\u6839\u636e\u57df\u540d\u586b\u5199 SAN&#xff1b;\u79c1\u94a5\u53ea\u4fdd\u7559\u5728\u670d\u52a1\u7aef\u3002<\/p>\n<\/p>\n<p>umask 077<br \/>\nopenssl genrsa -out \/etc\/ssl\/private\/server.key 2048<br \/>\nopenssl req -new -key \/etc\/ssl\/private\/server.key -out \/tmp\/server.csr<\/p>\n<p>CSR \u4e2d\u7684 Common Name \u548c SAN \u5e94\u5305\u542b\u5b9e\u9645\u8bbf\u95ee\u57df\u540d&#xff0c;\u4f8b\u5982 &lt;server-name&gt;\u3002\u8bc1\u4e66\u7b7e\u53d1\u5b8c\u6210\u540e&#xff0c;\u5c06\u8bc1\u4e66\u548c\u5b8c\u6574\u94fe\u4fdd\u5b58\u5230\u53d7\u4fdd\u62a4\u76ee\u5f55&#xff1a;<\/p>\n<\/p>\n<p>install -o root -g root -m 0644 server.crt \/etc\/ssl\/certs\/server.crt<br \/>\ninstall -o root -g root -m 0644 ca-chain.crt \/etc\/ssl\/certs\/ca-chain.crt<br \/>\nchmod 0600 \/etc\/ssl\/private\/server.key<\/p>\n<p>\u4e0d\u8981\u628a\u79c1\u94a5\u901a\u8fc7\u6587\u7ae0\u3001\u622a\u56fe\u6216\u65e5\u5fd7\u516c\u5f00\u3002<\/p>\n<\/p>\n<h4>4.3 \u914d\u7f6e HTTPS \u7ad9\u70b9<\/h4>\n<\/p>\n<p>\u7f16\u8f91\u7ad9\u70b9\u914d\u7f6e&#xff1a;<\/p>\n<\/p>\n<p>vi \/etc\/nginx\/sites-available\/default<\/p>\n<p>\u57fa\u7840 HTTPS \u914d\u7f6e\u793a\u4f8b&#xff1a;<\/p>\n<\/p>\n<p>server {<br \/>\n    listen 443 ssl;<br \/>\n    listen [::]:443 ssl;<br \/>\n    server_name &lt;server-name&gt;;<\/p>\n<p>    ssl_certificate     \/etc\/ssl\/certs\/server.crt;<br \/>\n    ssl_certificate_key \/etc\/ssl\/private\/server.key;<br \/>\n    ssl_protocols TLSv1.2 TLSv1.3;<\/p>\n<p>    root \/var\/www\/html;<br \/>\n    index index.html;<\/p>\n<p>    location \/ {<br \/>\n        try_files $uri $uri\/ &#061;404;<br \/>\n    }<br \/>\n}<\/p>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\u5148\u68c0\u67e5\u8bed\u6cd5&#xff1a;<\/p>\n<\/p>\n<p>nginx -t<br \/>\nsystemctl reload nginx<\/p>\n<h4>4.4 \u914d\u7f6e\u9759\u6001\u7f51\u9875\u548c\u8bbf\u95ee\u65e5\u5fd7<\/h4>\n<\/p>\n<p>\u521b\u5efa\u6d4b\u8bd5\u9875\u9762&#xff1a;<\/p>\n<\/p>\n<p>cat &gt; \/var\/www\/html\/index.html &lt;&lt;&#039;EOF&#039;<br \/>\nNginx HTTPS test page<br \/>\nEOF<br \/>\nchown -R www-data:www-data \/var\/www\/html<br \/>\nchmod 0755 \/var\/www\/html<\/p>\n<p>\u5728 \/etc\/nginx\/nginx.conf \u7684 http \u5757\u4e2d\u5b9a\u4e49\u8bbf\u95ee\u65e5\u5fd7\u683c\u5f0f&#xff0c;\u5e76\u6309\u7ad9\u70b9\u4fdd\u5b58\u65e5\u5fd7&#xff1a;<\/p>\n<\/p>\n<p>log_format main &#039;$remote_addr &#8211; $remote_user [$time_local] &#034;$request&#034; &#039;<br \/>\n                &#039;$status $body_bytes_sent &#034;$http_referer&#034; &#039;<br \/>\n                &#039;&#034;$http_user_agent&#034; &#034;$http_x_forwarded_for&#034;&#039;;<\/p>\n<p>access_log \/var\/log\/nginx\/access.log main;<br \/>\nerror_log  \/var\/log\/nginx\/error.log warn;<\/p>\n<p>\u4e0d\u8981\u628a\u65e5\u5fd7\u6587\u4ef6\u6743\u9650\u8bbe\u7f6e\u4e3a 777&#xff1b;\u6309 Nginx \u670d\u52a1\u8d26\u53f7\u548c\u65e5\u5fd7\u8f6e\u8f6c\u7b56\u7565\u7ba1\u7406\u6743\u9650\u3002<\/p>\n<\/p>\n<h4>4.5 \u9690\u85cf Nginx \u7248\u672c\u53f7<\/h4>\n<\/p>\n<p>\u5728 http \u5757\u4e2d\u52a0\u5165&#xff1a;<\/p>\n<\/p>\n<p>server_tokens off;<\/p>\n<p>\u68c0\u67e5\u914d\u7f6e\u5e76\u91cd\u8f7d&#xff1a;<\/p>\n<\/p>\n<p>nginx -t<br \/>\nsystemctl reload nginx<\/p>\n<p>\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7\u54cd\u5e94\u5934\u786e\u8ba4\u7248\u672c\u53f7\u662f\u5426\u9690\u85cf&#xff1a;<\/p>\n<\/p>\n<p>curl -kI https:\/\/&lt;server-name&gt;\/<\/p>\n<p>-k \u53ea\u7528\u4e8e\u5b9e\u9a8c\u73af\u5883\u8bc1\u4e66\u672a\u88ab\u5ba2\u6237\u7aef\u4fe1\u4efb\u7684\u60c5\u51b5&#xff0c;\u751f\u4ea7\u73af\u5883\u5e94\u6b63\u786e\u90e8\u7f72\u8bc1\u4e66\u94fe\u5e76\u53bb\u6389 -k\u3002<\/p>\n<\/p>\n<h4>4.6 \u914d\u7f6e HTTP \u81ea\u52a8\u8df3\u8f6c HTTPS<\/h4>\n<\/p>\n<p>\u5c06 80 \u7aef\u53e3\u7684\u7ad9\u70b9\u914d\u7f6e\u4e3a\u6c38\u4e45\u8df3\u8f6c&#xff1a;<\/p>\n<\/p>\n<p>server {<br \/>\n    listen 80;<br \/>\n    listen [::]:80;<br \/>\n    server_name &lt;server-name&gt;;<\/p>\n<p>    return 301 https:\/\/$host$request_uri;<br \/>\n}<\/p>\n<p>\u68c0\u67e5\u5e76\u91cd\u8f7d&#xff1a;<\/p>\n<\/p>\n<p>nginx -t<br \/>\nsystemctl reload nginx<br \/>\ncurl -I http:\/\/&lt;server-name&gt;\/<\/p>\n<p>\u54cd\u5e94\u5e94\u4e3a 301&#xff0c;\u5e76\u4e14 Location \u4fdd\u7559\u539f\u59cb\u8bf7\u6c42\u8def\u5f84\u548c\u67e5\u8be2\u53c2\u6570\u3002<\/p>\n<\/p>\n<h4>4.7 \u914d\u7f6e Nginx \u53cd\u5411\u4ee3\u7406 HTTPS \u540e\u7aef<\/h4>\n<\/p>\n<p>\u5728\u4ee3\u7406\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u540e\u7aef\u5730\u5740\u3002\u793a\u4f8b\u5c06\u8bf7\u6c42\u8f6c\u53d1\u5230 &lt;backend-server&gt;&#xff1a;<\/p>\n<\/p>\n<p>server {<br \/>\n    listen 443 ssl;<br \/>\n    server_name &lt;proxy-server-name&gt;;<\/p>\n<p>    ssl_certificate     \/etc\/ssl\/certs\/server.crt;<br \/>\n    ssl_certificate_key \/etc\/ssl\/private\/server.key;<\/p>\n<p>    location \/ {<br \/>\n        proxy_pass https:\/\/&lt;backend-server&gt;;<br \/>\n        proxy_ssl_server_name on;<br \/>\n        proxy_set_header Host $host;<br \/>\n        proxy_set_header X-Real-IP $remote_addr;<br \/>\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\n        proxy_set_header X-Forwarded-Proto $scheme;<br \/>\n    }<br \/>\n}<\/p>\n<p>\u5982\u679c\u540e\u7aef\u8bc1\u4e66\u7531\u5185\u90e8 CA \u7b7e\u53d1&#xff0c;\u5e94\u914d\u7f6e\u53ef\u4fe1 CA&#xff0c;\u800c\u4e0d\u662f\u5173\u95ed\u6821\u9a8c&#xff1a;<\/p>\n<\/p>\n<p>proxy_ssl_trusted_certificate \/etc\/nginx\/ca\/backend-ca.pem;<br \/>\nproxy_ssl_verify on;<br \/>\nproxy_ssl_verify_depth 2;<\/p>\n<p>\u4ee3\u7406\u914d\u7f6e\u793a\u4f8b\u622a\u56fe&#xff1a;<\/p>\n<\/p>\n<p><img decoding=\"async\" alt=\"image1\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906163645-6a9d969d823f9.png\" \/><\/p>\n<\/p>\n<p><img decoding=\"async\" alt=\"image2\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906163645-6a9d969d8ed5c.png\" \/><\/p>\n<\/p>\n<p>\u68c0\u67e5\u5e76\u91cd\u8f7d&#xff1a;<\/p>\n<\/p>\n<p>nginx -t<br \/>\nsystemctl reload nginx<br \/>\ncurl -kI https:\/\/&lt;proxy-server-name&gt;\/<\/p>\n<h4>4.8 \u8ba9\u540e\u7aef\u8bb0\u5f55\u771f\u5b9e\u5ba2\u6237\u7aef IP<\/h4>\n<\/p>\n<p>\u540e\u7aef Apache \u53ef\u5728\u65e5\u5fd7\u683c\u5f0f\u4e2d\u8bb0\u5f55 Nginx \u4f20\u9012\u7684\u5934\u90e8&#xff1a;<\/p>\n<\/p>\n<p>LogFormat &#034;%{X-Forwarded-For}i %h %l %u %t \\\\&#034;%r\\\\&#034; %&gt;s %b \\\\&#034;%{Referer}i\\\\&#034; \\\\&#034;%{User-Agent}i\\\\&#034;&#034; proxy_combined<\/p>\n<p>\u540e\u7aef Nginx \u53ef\u540c\u65f6\u8bb0\u5f55 TCP \u6765\u6e90\u548c\u4ee3\u7406\u5934\u90e8&#xff1a;<\/p>\n<\/p>\n<p>log_format main &#039;$remote_addr &#8211; $remote_user [$time_local] &#034;$request&#034; &#039;<br \/>\n                &#039;$status $body_bytes_sent &#034;$http_referer&#034; &#039;<br \/>\n                &#039;&#034;$http_user_agent&#034; &#034;$http_x_forwarded_for&#034;&#039;;<br \/>\naccess_log \/var\/log\/nginx\/access.log main;<\/p>\n<p>\u540e\u7aef\u65e5\u5fd7\u914d\u7f6e\u622a\u56fe&#xff1a;<\/p>\n<\/p>\n<p><img decoding=\"async\" alt=\"image3\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906163645-6a9d969d9eb68.png\" \/><\/p>\n<\/p>\n<p><img decoding=\"async\" alt=\"image4\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906163645-6a9d969dae667.png\" \/><\/p>\n<\/p>\n<p><img decoding=\"async\" alt=\"image5\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906163645-6a9d969dbb6ac.png\" \/><\/p>\n<\/p>\n<h4>4.9 \u914d\u7f6e\u9875\u9762\u7f13\u5b58&#xff08;\u6309\u9700\u542f\u7528&#xff09;<\/h4>\n<\/p>\n<p>\u53ea\u5bf9\u786e\u5b9a\u65e0\u767b\u5f55\u6001\u3001\u65e0\u4e2a\u6027\u5316\u6570\u636e\u7684 GET\/HEAD \u9875\u9762\u542f\u7528\u7f13\u5b58&#xff1a;<\/p>\n<\/p>\n<p>http {<br \/>\n    proxy_cache_path \/var\/cache\/nginx\/proxy_cache<br \/>\n                     levels&#061;1:2<br \/>\n                     keys_zone&#061;proxycache:20m<br \/>\n                     inactive&#061;120s<br \/>\n                     max_size&#061;1g;<\/p>\n<p>    server {<br \/>\n        listen 80;<br \/>\n        server_name &lt;cache-proxy-name&gt;;<\/p>\n<p>        location \/ {<br \/>\n            proxy_pass https:\/\/&lt;backend-server&gt;;<br \/>\n            proxy_set_header Host $host;<br \/>\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\n            proxy_cache proxycache;<br \/>\n            proxy_cache_key &#034;$scheme$request_method$host$request_uri&#034;;<br \/>\n            proxy_cache_valid 200 302 10m;<br \/>\n            proxy_cache_valid any 1m;<br \/>\n            add_header X-Cache-Status $upstream_cache_status always;<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<p>\u914d\u7f6e\u7f13\u5b58\u76ee\u5f55\u5c5e\u4e3b\u540e\u68c0\u67e5&#xff1a;<\/p>\n<\/p>\n<p>mkdir -p \/var\/cache\/nginx\/proxy_cache<br \/>\nchown -R www-data:www-data \/var\/cache\/nginx\/proxy_cache<br \/>\nnginx -t<br \/>\nsystemctl reload nginx<\/p>\n<h3>5. \u9a8c\u8bc1\u7ed3\u679c<\/h3>\n<\/p>\n<h4>5.1 \u670d\u52a1\u3001\u914d\u7f6e\u548c\u7aef\u53e3<\/h4>\n<\/p>\n<p>nginx -t<br \/>\nsystemctl is-active nginx<br \/>\nsystemctl status nginx &#8211;no-pager<br \/>\nss -lntup | grep -E &#039;:80|:443&#039;<\/p>\n<p>Nginx \u5e94\u5904\u4e8e active \u72b6\u6001&#xff0c;\u8bed\u6cd5\u68c0\u67e5\u8fd4\u56de successful&#xff0c;\u5e76\u76d1\u542c\u5b9e\u9645\u4f7f\u7528\u7684 80\/443 \u7aef\u53e3\u3002<\/p>\n<\/p>\n<h4>5.2 \u9a8c\u8bc1 HTTP \u8df3\u8f6c\u548c HTTPS \u54cd\u5e94<\/h4>\n<\/p>\n<p>curl -I http:\/\/&lt;server-name&gt;\/<br \/>\ncurl -I https:\/\/&lt;server-name&gt;\/<br \/>\ncurl -sS -D- https:\/\/&lt;server-name&gt;\/ -o \/tmp\/nginx-body.txt<\/p>\n<p>HTTP \u5e94\u8fd4\u56de 301\/302 \u5e76\u6307\u5411 HTTPS&#xff1b;HTTPS \u5e94\u8fd4\u56de\u9884\u671f\u4e1a\u52a1\u72b6\u6001\u7801\u3002\u8bc1\u4e66\u672a\u88ab\u5ba2\u6237\u7aef\u4fe1\u4efb\u65f6\u4ec5\u5728\u5b9e\u9a8c\u4e2d\u4e34\u65f6\u4f7f\u7528 curl -k&#xff0c;\u751f\u4ea7\u73af\u5883\u5e94\u4fee\u590d\u8bc1\u4e66\u94fe\u3002<\/p>\n<\/p>\n<h4>5.3 \u9a8c\u8bc1\u7248\u672c\u9690\u85cf\u548c\u53cd\u5411\u4ee3\u7406<\/h4>\n<\/p>\n<p>curl -sS -k -D- https:\/\/&lt;server-name&gt;\/ -o \/dev\/null | grep -i &#039;^Server:&#039;<br \/>\ncurl -sS -k https:\/\/&lt;proxy-server-name&gt;\/<br \/>\ntail -n 50 \/var\/log\/nginx\/access.log<\/p>\n<p>\u54cd\u5e94\u5934\u4e0d\u5e94\u66b4\u9732\u5177\u4f53 Nginx \u7248\u672c&#xff1b;\u4ee3\u7406\u8fd4\u56de\u540e\u7aef\u5185\u5bb9&#xff0c;\u8bbf\u95ee\u65e5\u5fd7\u80fd\u591f\u8bb0\u5f55\u8bf7\u6c42\u548c\u72b6\u6001\u7801\u3002\u771f\u5b9e\u5ba2\u6237\u7aef IP \u7684\u5224\u65ad\u8981\u7ed3\u5408 Nginx \u4e0e\u540e\u7aef\u65e5\u5fd7&#xff0c;\u4e0d\u8981\u53ea\u770b\u540e\u7aef $remote_addr\u3002<\/p>\n<\/p>\n<h4>5.4 \u9a8c\u8bc1\u7f13\u5b58\u72b6\u6001<\/h4>\n<\/p>\n<p>curl -sS -D- http:\/\/&lt;cache-proxy-name&gt;\/ -o \/dev\/null | grep -i &#039;^X-Cache-Status:&#039;<br \/>\ncurl -sS -D- http:\/\/&lt;cache-proxy-name&gt;\/ -o \/dev\/null | grep -i &#039;^X-Cache-Status:&#039;<\/p>\n<p>\u7b2c\u4e8c\u6b21\u8bf7\u6c42\u51fa\u73b0 HIT \u624d\u8bf4\u660e\u547d\u4e2d\u7f13\u5b58&#xff1b;\u5982\u679c\u8fd4\u56de MISS\u3001BYPASS \u6216\u6ca1\u6709\u54cd\u5e94\u5934&#xff0c;\u68c0\u67e5\u7f13\u5b58\u89c4\u5219\u3001\u8bf7\u6c42\u65b9\u6cd5\u3001\u54cd\u5e94\u5934\u548c\u662f\u5426\u643a\u5e26\u767b\u5f55 Cookie\u3002<\/p>\n<\/p>\n<h4>5.5 \u9a8c\u8bc1\u65e5\u5fd7\u548c\u6545\u969c\u4fe1\u606f<\/h4>\n<\/p>\n<p>tail -n 50 \/var\/log\/nginx\/error.log<br \/>\njournalctl -u nginx -n 50 &#8211;no-pager<\/p>\n<p>\u51fa\u73b0 4xx\/5xx \u65f6&#xff0c;\u7ed3\u5408 Nginx \u9519\u8bef\u65e5\u5fd7\u3001\u540e\u7aef\u65e5\u5fd7\u3001DNS\u3001\u8bc1\u4e66\u548c\u4ee3\u7406\u8fde\u901a\u6027\u5b9a\u4f4d\u5b9e\u9645\u5931\u8d25\u5c42\u7ea7\u3002<\/p>\n<\/p>\n<h3>6. \u5e38\u89c1\u95ee\u9898\u6392\u67e5<\/h3>\n<\/p>\n<p>\u2022 **Nginx \u542f\u52a8\u5931\u8d25**&#xff1a;\u5148\u6267\u884c nginx -t&#xff0c;\u68c0\u67e5\u62ec\u53f7\u3001\u5206\u53f7\u3001\u8bc1\u4e66\u8def\u5f84\u548c\u91cd\u590d\u76d1\u542c\u914d\u7f6e\u3002<\/p>\n<p>\u2022 **HTTP \u6ca1\u6709\u8df3 HTTPS**&#xff1a;\u68c0\u67e5 80 \u7aef\u53e3\u662f\u5426\u547d\u4e2d\u76ee\u6807 server_name&#xff0c;\u786e\u8ba4 return 301 \u4f4d\u4e8e\u6b63\u786e\u7684 server \u5757\u3002<\/p>\n<p>\u2022 **HTTPS \u8bc1\u4e66\u9519\u8bef**&#xff1a;\u68c0\u67e5\u57df\u540d\u3001SAN\u3001\u8bc1\u4e66\u94fe\u3001\u79c1\u94a5\u5339\u914d\u5173\u7cfb\u548c\u5ba2\u6237\u7aef\u4fe1\u4efb\u94fe&#xff1b;\u4e0d\u8981\u7528 curl -k \u63a9\u76d6\u751f\u4ea7\u95ee\u9898\u3002<\/p>\n<p>\u2022 **\u53cd\u5411\u4ee3\u7406 502\/504**&#xff1a;\u4ece Nginx Server \u6267\u884c curl \u8bbf\u95ee\u540e\u7aef&#xff0c;\u68c0\u67e5\u540e\u7aef\u7aef\u53e3\u3001DNS\u3001TLS\/SNI\u3001\u8def\u7531\u548c\u9632\u706b\u5899\u3002<\/p>\n<p>\u2022 **\u540e\u7aef\u770b\u5230\u7684\u662f\u4ee3\u7406 IP**&#xff1a;\u786e\u8ba4 X-Forwarded-For \u914d\u7f6e\u548c\u540e\u7aef\u65e5\u5fd7\u683c\u5f0f&#xff1b;\u53ea\u5bf9\u53ef\u4fe1\u4ee3\u7406\u542f\u7528\u771f\u5b9e IP \u89e3\u6790\u3002<\/p>\n<p>\u2022 **\u7248\u672c\u53f7\u4ecd\u663e\u793a**&#xff1a;\u786e\u8ba4 server_tokens off \u4f4d\u4e8e http\u3001server \u6216 location \u6709\u6548\u4e0a\u4e0b\u6587&#xff0c;\u5e76\u6267\u884c reload \u540e\u91cd\u65b0\u8bf7\u6c42\u3002<\/p>\n<p>\u2022 **\u7f13\u5b58\u5bfc\u81f4\u65e7\u9875\u9762**&#xff1a;\u68c0\u67e5 X-Cache-Status\u3001\u7f13\u5b58\u952e\u3001\u7f13\u5b58\u6709\u6548\u671f\u3001Cookie \u548c\u54cd\u5e94\u5934&#xff1b;\u914d\u7f6e\u53d8\u66f4\u540e\u6309\u9700\u6e05\u7406\u7f13\u5b58\u3002<\/p>\n<p>\u2022 **\u65e5\u5fd7\u6587\u4ef6\u65e0\u6cd5\u5199\u5165**&#xff1a;\u68c0\u67e5 \/var\/log\/nginx \u6743\u9650\u3001\u65e5\u5fd7\u8f6e\u8f6c\u548c\u78c1\u76d8\u7a7a\u95f4&#xff0c;\u4e0d\u8981\u76f4\u63a5\u653e\u5f00 777 \u6743\u9650\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian Nginx \u914d\u7f6e\u5b9e\u6218&#xff1a;HTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP1. \u670d\u52a1\u4ecb\u7ecdNginx \u662f\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u548c\u53cd\u5411\u4ee3\u7406&#xff0c;\u5e38\u7528\u4e8e\u53d1\u5e03\u9759\u6001\u7f51\u9875\u3001\u627f\u8f7d HTTPS \u5165\u53e3\u3001\u8f6c\u53d1\u540e\u7aef\u5e94\u7528\u3001\u9690\u85cf\u540e\u7aef\u62d3\u6251\u3001\u7f13\u5b58\u54cd\u5e94\u548c\u7edf\u4e00\u8bb0\u5f55\u8bbf\u95ee\u65e5\u5fd7\u3002\u672c\u6587\u4ee5 Debian \u73af\u5883\u4e3a\u4f8b&#xff0c;\u4e32\u8054\u8bc1\u4e66\u7533\u8bf7\u3001HTTPS \u7ad9\u70b9\u3001HTTP \u81ea\u52a8\u8df3\u8f6c\u3001\u7248\u672c\u53f7\u9690\u85cf\u3001\u9759\u6001\u9875\u9762\u3001HTTPS \u53cd\u5411\u4ee3\u7406\u3001\u771f\u5b9e\u5ba2\u6237\u7aef IP \u548c\u9875\u9762\u7f13\u5b58\u914d\u7f6e\u3002Nginx \u53ef\u4ee5\u5de5\u4f5c\u5728 Web \u670d\u52a1\u5c42<\/p>\n","protected":false},"author":2,"featured_media":101558,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[402,58],"topic":[],"class_list":["post-101563","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-debian","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/101563.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Debian Nginx \u914d\u7f6e\u5b9e\u6218&#xff1a;HTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP1. \u670d\u52a1\u4ecb\u7ecdNginx \u662f\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u548c\u53cd\u5411\u4ee3\u7406&#xff0c;\u5e38\u7528\u4e8e\u53d1\u5e03\u9759\u6001\u7f51\u9875\u3001\u627f\u8f7d HTTPS \u5165\u53e3\u3001\u8f6c\u53d1\u540e\u7aef\u5e94\u7528\u3001\u9690\u85cf\u540e\u7aef\u62d3\u6251\u3001\u7f13\u5b58\u54cd\u5e94\u548c\u7edf\u4e00\u8bb0\u5f55\u8bbf\u95ee\u65e5\u5fd7\u3002\u672c\u6587\u4ee5 Debian \u73af\u5883\u4e3a\u4f8b&#xff0c;\u4e32\u8054\u8bc1\u4e66\u7533\u8bf7\u3001HTTPS \u7ad9\u70b9\u3001HTTP \u81ea\u52a8\u8df3\u8f6c\u3001\u7248\u672c\u53f7\u9690\u85cf\u3001\u9759\u6001\u9875\u9762\u3001HTTPS \u53cd\u5411\u4ee3\u7406\u3001\u771f\u5b9e\u5ba2\u6237\u7aef IP \u548c\u9875\u9762\u7f13\u5b58\u914d\u7f6e\u3002Nginx \u53ef\u4ee5\u5de5\u4f5c\u5728 Web \u670d\u52a1\u5c42\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/101563.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-06T16:36:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906163645-6a9d969d823f9.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101563.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/101563.html\",\"name\":\"Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-06T16:36:46+00:00\",\"dateModified\":\"2026-09-06T16:36:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/101563.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/101563.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101563.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/101563.html","og_locale":"zh_CN","og_type":"article","og_title":"Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Debian Nginx \u914d\u7f6e\u5b9e\u6218&#xff1a;HTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP1. \u670d\u52a1\u4ecb\u7ecdNginx \u662f\u9ad8\u6027\u80fd Web \u670d\u52a1\u5668\u548c\u53cd\u5411\u4ee3\u7406&#xff0c;\u5e38\u7528\u4e8e\u53d1\u5e03\u9759\u6001\u7f51\u9875\u3001\u627f\u8f7d HTTPS \u5165\u53e3\u3001\u8f6c\u53d1\u540e\u7aef\u5e94\u7528\u3001\u9690\u85cf\u540e\u7aef\u62d3\u6251\u3001\u7f13\u5b58\u54cd\u5e94\u548c\u7edf\u4e00\u8bb0\u5f55\u8bbf\u95ee\u65e5\u5fd7\u3002\u672c\u6587\u4ee5 Debian \u73af\u5883\u4e3a\u4f8b&#xff0c;\u4e32\u8054\u8bc1\u4e66\u7533\u8bf7\u3001HTTPS \u7ad9\u70b9\u3001HTTP \u81ea\u52a8\u8df3\u8f6c\u3001\u7248\u672c\u53f7\u9690\u85cf\u3001\u9759\u6001\u9875\u9762\u3001HTTPS \u53cd\u5411\u4ee3\u7406\u3001\u771f\u5b9e\u5ba2\u6237\u7aef IP \u548c\u9875\u9762\u7f13\u5b58\u914d\u7f6e\u3002Nginx \u53ef\u4ee5\u5de5\u4f5c\u5728 Web \u670d\u52a1\u5c42","og_url":"https:\/\/www.wsisp.com\/helps\/101563.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-06T16:36:46+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260906163645-6a9d969d823f9.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/101563.html","url":"https:\/\/www.wsisp.com\/helps\/101563.html","name":"Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-06T16:36:46+00:00","dateModified":"2026-09-06T16:36:46+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/101563.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/101563.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/101563.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Debian Nginx \u914d\u7f6e\u5b9e\u6218\uff1aHTTPS\u3001\u91cd\u5b9a\u5411\u3001\u53cd\u5411\u4ee3\u7406\u4e0e\u771f\u5b9e IP"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=101563"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101563\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/101558"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=101563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=101563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=101563"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=101563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}