{"id":33298,"date":"2023-11-09T11:44:31","date_gmt":"2023-10-20T13:37:16","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/"},"modified":"2024-05-04T08:13:14","modified_gmt":"2024-05-04T00:13:14","slug":"%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/","title":{"rendered":"\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1"},"content":{"rendered":"<p>\u57fa\u672c\u8ba4\u8bc1\u662f\u5c06ID\/PASS\u8fdb\u884cBase64\u7f16\u7801\uff0c\u56e0\u6b64\u5f88\u5bb9\u6613\u88ab\u89e3\u7801\uff0c\u4e0d\u5b89\u5168\u3002<br \/>\n\u6458\u8981\u8ba4\u8bc1\u4f7f\u7528MD5\u8fdb\u884c\u7f16\u7801\uff0c\u56e0\u6b64\u7a83\u542c\/\u7be1\u6539\u7684\u98ce\u9669\u6bd4\u57fa\u672c\u8ba4\u8bc1\u4f4e\u3002<br \/>\n\u7136\u800c\uff0cnginx\u9ed8\u8ba4\u4e0d\u652f\u6301\u6458\u8981\u8ba4\u8bc1\u3002\u53ef\u4ee5\u901a\u8fc7\u4ece\u6e90\u4ee3\u7801\u4e2d\u6dfb\u52a0\u5916\u90e8\u6a21\u5757\u5e76\u8fdb\u884c\u7f16\u8bd1\u6765\u5b9e\u73b0\u652f\u6301\u3002<\/p>\n<h1>\u73af\u5883<\/h1>\n<p>\u5728Windows 10 Pro\u7684Hyper-V\u4e0a\u521b\u5efa\u4ee5\u4e0b\u865a\u62df\u673a\u8fdb\u884c\u9a8c\u8bc1\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">CentOS 8.0.1905<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Nginx 1.17.7<\/ul>\n<p>\u6b64\u5916\uff0c\u6211\u540c\u65f6\u542f\u7528\u4e86Firewalld\u548cSELinux\u3002<\/p>\n<h1>\u6d41\u52a8<\/h1>\n<p>\u6240\u6709\u7684\u547d\u4ee4\u90fd\u5fc5\u987b\u4ee5root\u7528\u6237\u8eab\u4efd\u6267\u884c\u3002<\/p>\n<h2>1. \u5b89\u88c5\u6240\u9700\u7684\u8f6f\u4ef6\u5305<\/h2>\n<pre class=\"post-pre\"><code># dnf install gcc pcre pcre-devel make perl httpd-tools\r\n<\/code><\/pre>\n<p>gcc\u3001pcre\u3001pcre-devel\u3001make\u548cperl\u662f\u5fc5\u9700\u7684\u6765\u8fdb\u884c\u7f16\u8bd1\u548c\u5b89\u88c5\u3002<br \/>\nhttpd-tools\u7684\u5b89\u88c5\u662f\u4e3a\u4e86\u4f7f\u7528htdigest\u751f\u6210\u7528\u4e8eDigest\u8ba4\u8bc1\u7684\u5bc6\u7801\u6587\u4ef6\u3002<\/p>\n<h2>2. \u4e0b\u8f7d\u6e90\u4ee3\u7801<\/h2>\n<pre class=\"post-pre\"><code># wget \"http:\/\/nginx.org\/download\/nginx-1.17.7.tar.gz\" -O \/tmp\/nginx-1.17.7.tar.gz\r\n# wget \"https:\/\/github.com\/atomx\/nginx-http-auth-digest\/archive\/master.zip\" -O \/tmp\/nginx-http-auth-digest.zip\r\n# wget \"http:\/\/zlib.net\/zlib-1.2.11.tar.gz\" -O \/tmp\/zlib-1.2.11.tar.gz\r\n# wget \"https:\/\/www.openssl.org\/source\/openssl-1.1.1d.tar.gz\" -O \/tmp\/openssl-1.1.1d.tar.gz\r\n<\/code><\/pre>\n<p>\u4ece\u4e0a\u5f80\u4e0b<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Nginx\u672c\u4f53<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Digest\u8a8d\u8a3c\u30e2\u30b8\u30e5\u30fc\u30eb https:\/\/github.com\/samizdatco\/nginx-http-auth-digest<\/ul>\n<\/li>\n<\/ul>\n<p>zlib (gzip\u5727\u7e2e\u306b\u4f7f\u7528)<br \/>\nOpenSSL<\/p>\n<p>\u9996\u5148\uff0c\u5c06\u5176\u89e3\u538b\u7f29\u5230\/usr\/local\/src\/\u76ee\u5f55\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code># tar zxvf \/tmp\/nginx-1.17.7.tar.gz -C \/usr\/local\/src\/\r\n# unzip \/tmp\/nginx-http-auth-digest.zip -d \/usr\/local\/src\/\r\n# tar zxvf \/tmp\/zlib-1.2.11.tar.gz -C \/usr\/local\/src\/\r\n# tar zxvf \/tmp\/openssl-1.1.1d.tar.gz -C \/usr\/local\/src\/\r\n<\/code><\/pre>\n<h2>3. \u7f16\u8bd1\u548c\u5b89\u88c5<\/h2>\n<pre class=\"post-pre\"><code># cd \/usr\/local\/src\/nginx-1.17.7\r\n# .\/configure --prefix=\/etc\/nginx --sbin-path=\/usr\/sbin\/nginx --conf-path=\/etc\/nginx\/nginx.conf --error-log-path=\/var\/log\/nginx\/error.log --http-log-path=\/var\/log\/nginx\/access.log --pid-path=\/var\/run\/nginx.pid --lock-path=\/var\/run\/nginx.lock --http-client-body-temp-path=\/var\/cache\/nginx\/client_temp --http-proxy-temp-path=\/var\/cache\/nginx\/proxy_temp --http-fastcgi-temp-path=\/var\/cache\/nginx\/fastcgi_temp --http-uwsgi-temp-path=\/var\/cache\/nginx\/uwsgi_temp --http-scgi-temp-path=\/var\/cache\/nginx\/scgi_temp --user=nginx --group=nginx --with-openssl=\/usr\/local\/src\/openssl-1.1.1d --with-zlib=\/usr\/local\/src\/zlib-1.2.11 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-http_v2_module --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --add-module=..\/nginx-http-auth-digest-master\/\r\n# make &amp;&amp; make install\r\n<\/code><\/pre>\n<h2>\u5236\u4f5c\u5404\u79cd\u6240\u9700\u4e4b\u7269\u3002<\/h2>\n<p>\u5236\u9020\u90a3\u4e9b\u4e0d\u80fd\u81ea\u52a8\u5316\u7684\u7269\u54c1<\/p>\n<h3>4-1. \u521b\u5efa\u7528\u6237<\/h3>\n<p>\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u8fd0\u884cNginx\u7684\u7528\u6237\u3002<\/p>\n<pre class=\"post-pre\"><code># groupadd nginx\r\n# useradd -g nginx nginx\r\n# usermod -s \/bin\/false nginx\r\n<\/code><\/pre>\n<h3>4-2. \u521b\u5efa\u7f13\u5b58\u76ee\u5f55<\/h3>\n<pre class=\"post-pre\"><code># mkdir -p \/var\/cache\/nginx\/client_temp\r\n<\/code><\/pre>\n<h3>4-3. \u521b\u5efa\u542f\u52a8\u811a\u672c<\/h3>\n<p>\u6211\u4eec\u4e5f\u53ef\u4ee5\u81ea\u5df1\u521b\u5efasystemd\u811a\u672c\u3002<\/p>\n<pre class=\"post-pre\"><code># cat &lt;&lt;EOF &gt; \/usr\/lib\/systemd\/system\/nginx.service\r\n[Unit]\r\nDescription=The nginx HTTP and reverse proxy server\r\nAfter=network.target remote-fs.target nss-lookup.target\r\n\r\n[Service]\r\nType=forking\r\nPIDFile=\/run\/nginx.pid\r\n# Nginx will fail to start if \/run\/nginx.pid already exists but has the wrong\r\n# SELinux context. This might happen when running `nginx -t` from the cmdline.\r\n# https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=1268621\r\nExecStartPre=\/usr\/bin\/rm -f \/run\/nginx.pid\r\nExecStartPre=\/usr\/sbin\/nginx -t\r\nExecStart=\/usr\/sbin\/nginx\r\nExecReload=\/bin\/kill -s HUP $MAINPID\r\nKillSignal=SIGQUIT\r\nTimeoutStopSec=5\r\nKillMode=mixed\r\nPrivateTmp=true\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\nEOF\r\n<\/code><\/pre>\n<h3>4-4. \u65e5\u5fd7\u8f6e\u8f6c\u8bbe\u7f6e<\/h3>\n<p>\u521b\u5efalogrotate.d\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<pre class=\"post-pre\"><code># cat &lt;&lt;EOF &gt; \/etc\/logrotate.d\/nginx\r\n\/var\/log\/nginx\/*log {\r\n    create 0664 nginx root\r\n    daily\r\n    rotate 10\r\n    missingok\r\n    notifempty\r\n    compress\r\n    sharedscripts\r\n    postrotate\r\n        \/bin\/kill -USR1 `cat \/run\/nginx.pid 2&gt;\/dev\/null` 2&gt;\/dev\/null || true\r\n    endscript\r\n}\r\nEOF\r\n<\/code><\/pre>\n<h3>4-5. \u9632\u706b\u5899<\/h3>\n<p>\u4e3a\u4e86\u963b\u6b62\u5916\u90e8\u8bbf\u95ee\uff0c\u9700\u8981\u5728firewalld\u4e2d\u8fdb\u884c\u6388\u6743\u8bbe\u7f6e\u3002\u8bf7\u5c06HTTP\u548cHTTPS\u90fd\u6253\u5f00\u3002<\/p>\n<pre class=\"post-pre\"><code># firewall-cmd --add-service=http --zone=public\r\n# firewall-cmd --add-service=https --zone=public\r\n<\/code><\/pre>\n<h3>4-6. \u5275\u5efa\u5bc6\u78bc\u6a94\u6848<\/h3>\n<pre class=\"post-pre\"><code># htdigest -c \/etc\/nginx\/.htdigest_test \"test\" user\r\nAdding password for user in realm test.\r\nNew password:\r\nRe-type new password:\r\n<\/code><\/pre>\n<p>\u4f7f\u7528 -c \u9009\u9879\u521b\u5efa\u65b0\u7684\u5bc6\u7801\u6587\u4ef6<br \/>\n\u5c06 &#8220;test&#8221; \u66ff\u6362\u4e3a realm \u540d\u79f0<br \/>\n\u5c06 &#8220;user&#8221; \u66ff\u6362\u4e3a\u8ba4\u8bc1\u65f6\u7684\u7528\u6237\u540d<\/p>\n<p>\u5bc6\u7801\u91c7\u7528\u5bf9\u8bdd\u5f0f\u8981\u6c42\u8f93\u5165\u3002<\/p>\n<h2>5. \u5728Nginx\u4e2d\u8bbe\u7f6eDigest\u8ba4\u8bc1\u3002<\/h2>\n<pre class=\"post-pre\"><code># vi \/etc\/nginx\/nginx.conf\r\n<\/code><\/pre>\n<p>\u8bd5\u7528\/\u8bbe\u7f6e<\/p>\n<pre class=\"post-pre\"><code>        location \/ {\r\n            root   html;\r\n            index  index.html index.htm;\r\n            auth_digest \"test\";\r\n            auth_digest_user_file \/etc\/nginx\/.htdigest_test;\r\n        }\r\n<\/code><\/pre>\n<p>\u5728\u521b\u5efa\u5bc6\u7801\u6587\u4ef6\u65f6\uff0c\u5c06\u6307\u5b9a\u7684realm\u540d\u79f0\u653e\u5165auth_digest\u3002\u5728auth_digest_user_file\u4e2d\u6307\u5b9a\u5bc6\u7801\u6587\u4ef6\u540d\u3002<\/p>\n<h2>6. \u542f\u52a8Nginx<\/h2>\n<pre class=\"post-pre\"><code># systemctl enable nginx.service\r\n# systemctl start nginx.service\r\n<\/code><\/pre>\n<h2>7. \u9a57\u8b49\u52d5\u4f5c<\/h2>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d171537434c4406c02e3c\/46-0.png\" alt=\"Image2.png\" \/><\/div>\n<p>\u5982\u679c\u8ba4\u8bc1\u6210\u529f\uff0c\u9875\u9762\u5c06\u663e\u793a\u51fa\u6765\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d171537434c4406c02e3c\/48-0.png\" alt=\"Image4.png\" \/><\/div>\n<p>\u987a\u4fbf\u63d0\u4e00\u4e0b\uff0c\u5bf9\u4e8ecurl\u547d\u4ee4\uff0c\u9664\u4e86\u4f7f\u7528 -u &#8220;\u7528\u6237\u540d:\u5bc6\u7801&#8221; \u53c2\u6570\u5916\uff0c\u8fd8\u9700\u6dfb\u52a0 &#8211;digest \u9009\u9879\u3002<\/p>\n<pre class=\"post-pre\"><code>C:\\&gt;curl --digest -u \"user:password\" -I http:\/\/192.168.0.31\/\r\nHTTP\/1.1 401 Unauthorized\r\nServer: nginx\/1.17.7\r\nDate: Mon, 24 Feb 2020 04:39:39 GMT\r\nContent-Type: text\/html\r\nContent-Length: 179\r\nConnection: keep-alive\r\nWWW-Authenticate: Digest algorithm=\"MD5\", qop=\"auth\", realm=\"test\", nonce=\"39e753bf5e53538b\"\r\n\r\nHTTP\/1.1 200 OK\r\nServer: nginx\/1.17.7\r\nDate: Mon, 24 Feb 2020 04:39:40 GMT\r\nContent-Type: text\/html\r\nContent-Length: 612\r\nLast-Modified: Mon, 24 Feb 2020 04:21:48 GMT\r\nConnection: keep-alive\r\nAuthentication-Info: qop=\"auth\", rspauth=\"0565bae4b6bfbda5513657687d318700\", cnonce=\"66a3a2f56a85034803fdd085b686f8c3\", nc=00000001\r\nETag: \"5e534f5c-264\"\r\nAccept-Ranges: bytes\r\n\r\n<\/code><\/pre>\n<p>\u66ab\u6642\u770b\u4f86\u4f3c\u4e4e\u5728\u904b\u4f5c\u4e2d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u672c\u8ba4\u8bc1\u662f\u5c06ID\/PASS\u8fdb\u884cBase64\u7f16\u7801\uff0c\u56e0\u6b64\u5f88\u5bb9\u6613\u88ab\u89e3\u7801\uff0c\u4e0d\u5b89\u5168\u3002 \u6458\u8981\u8ba4\u8bc1\u4f7f\u7528MD5\u8fdb\u884c\u7f16\u7801\uff0c\u56e0\u6b64\u7a83 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-33298","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1 - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/\u4f7f\u7528nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1\" \/>\n<meta property=\"og:description\" content=\"\u57fa\u672c\u8ba4\u8bc1\u662f\u5c06ID\/PASS\u8fdb\u884cBase64\u7f16\u7801\uff0c\u56e0\u6b64\u5f88\u5bb9\u6613\u88ab\u89e3\u7801\uff0c\u4e0d\u5b89\u5168\u3002 \u6458\u8981\u8ba4\u8bc1\u4f7f\u7528MD5\u8fdb\u884c\u7f16\u7801\uff0c\u56e0\u6b64\u7a83 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-20T13:37:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T00:13:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d171537434c4406c02e3c\/46-0.png\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/\",\"name\":\"\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-10-20T13:37:16+00:00\",\"dateModified\":\"2024-05-04T00:13:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1 - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/\u4f7f\u7528nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1","og_description":"\u57fa\u672c\u8ba4\u8bc1\u662f\u5c06ID\/PASS\u8fdb\u884cBase64\u7f16\u7801\uff0c\u56e0\u6b64\u5f88\u5bb9\u6613\u88ab\u89e3\u7801\uff0c\u4e0d\u5b89\u5168\u3002 \u6458\u8981\u8ba4\u8bc1\u4f7f\u7528MD5\u8fdb\u884c\u7f16\u7801\uff0c\u56e0\u6b64\u7a83 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-10-20T13:37:16+00:00","article_modified_time":"2024-05-04T00:13:14+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d171537434c4406c02e3c\/46-0.png"}],"author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/","name":"\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-10-20T13:37:16+00:00","dateModified":"2024-05-04T00:13:14+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Nginx\u8fdb\u884c\u6458\u8981\u8ba4\u8bc1"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8nginx%e8%bf%9b%e8%a1%8c%e6%91%98%e8%a6%81%e8%ae%a4%e8%af%81\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=33298"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33298\/revisions"}],"predecessor-version":[{"id":97166,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33298\/revisions\/97166"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=33298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=33298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=33298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}