{"id":41233,"date":"2020-02-21T05:59:56","date_gmt":"2020-02-20T21:59:56","guid":{"rendered":"http:\/\/4563.org\/?p=41233"},"modified":"2020-02-21T05:59:56","modified_gmt":"2020-02-20T21:59:56","slug":"%e3%80%90%e4%b8%8d%e6%87%82%e5%b0%b1%e9%97%ae%e3%80%91nginx%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e7%ab%af%e5%8f%a3%e7%9a%84%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=41233","title":{"rendered":"\u3010\u4e0d\u61c2\u5c31\u95ee\u3011Nginx\u53cd\u5411\u4ee3\u7406\u7aef\u53e3\u7684\u8bbe\u7f6e"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>edear<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-2 12:06:55\t<\/p>\n<h3>\u3010\u4e0d\u61c2\u5c31\u95ee\u3011Nginx\u53cd\u5411\u4ee3\u7406\u7aef\u53e3\u7684\u8bbe\u7f6e<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 edear \u4e8e 2019-12-2 12:09 \u7f16\u8f91 <\/p>\n<p> \u60f3\u4f7f\u7528\u540c\u4e00\u53f0\u5c0f\u9e21\u7684666\u7aef\u53e3\u505a\u53cd\u4ee3+\u7f13\u5b58444\u7aef\u53e3\u3002<\/p>\n<p>  \u8bbf\u95eeWordPress\u524d\u53f0\uff1a<br \/>  https:\/\/DOMAIN.COM:666<br \/>  \u63d0\u793a\u9519\u8bef\uff1a<br \/>  DOMAIN.COM redirected you too many times.<br \/>  ERR_TOO_MANY_REDIRECTS<\/p>\n<p>  \u8bbf\u95ee\u540e\u53f0\u662f\u6b63\u5e38\u7684\uff1a<br \/>  https:\/\/DOMAIN.COM:666\/wp-admin\/<\/p>\n<p>  WordPress\u88c5\u5728\u5c0f\u9e21\u7684666\u7aef\u53e3\u4e0a\u3002<\/p>\n<p>  \u4e0b\u9762\u662f666\u7aef\u53e3\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5927\u4f6c\u4eec\u770b\u770b\u54ea\u91cc\u51fa\u95ee\u9898\u4e86\uff1f<br \/>  server {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;listen 666 ssl;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;listen [::]:666 ssl;<br \/>  #<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;server_name DOMAIN.COM;<br \/>  #<br \/>  # Protect .git and other hidden files<br \/>  # Left logging for fail2ban<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;location ~ \/. { deny all; }<\/p>\n<p>  # proxy cache status<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;add_header X-Cache $upstream_cache_status;<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;ssl on;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; ssl_certificate&nbsp; &nbsp;\/etc\/ssh-keys\/DOMAIN.COM\/1_DOMAIN.COM_bundle.crt;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; ssl_certificate_key \/etc\/ssh-keys\/DOMAIN.COM\/2_DOMAIN.COM.key;<br \/>  # Proxy settings<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;location \/ {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_pass&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; https:\/\/DOMAIN.COM:444\/;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_redirect&nbsp; &nbsp;&nbsp; &nbsp;off;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_set_header&nbsp; &nbsp; X-Real-IP&nbsp; &nbsp;&nbsp; &nbsp; $remote_addr;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_set_header&nbsp; &nbsp; X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_set_header X-Forwarded-Proto https;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; # proxy_set_header X-Forwarded-Port 444;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_set_header Host $host;<br \/>  # Proxy cache<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_cache proxy-cache;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_cache_valid200 30260m;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; proxy_cache_valid404&nbsp; &nbsp;&nbsp; &nbsp;1m;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<br \/>  # Purge proxy cache<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;location ~ \/purge(\/.*) {<br \/>  #&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_cache_purge proxy-cache &#8216;$scheme:\/\/$host$1&#8217;;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<br \/>  }\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Luna<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-2 13:02:13\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5144\u5f1f\uff0c\u8981\u4e0d\u8981\u8bd5\u8bd5caddy\uff0c\u4e00\u8bd5\u89e3\u5343\u6101\uff0c\u5c24\u5176\u662f\u770b\u4e0d\u61c2\u7684Nginx\u914d\u7f6e\u6587\u4ef6\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>edear \u5927\u4f6c\u6709\u8bdd\u8bf4 : 201&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/41233"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=41233"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/41233\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=41233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41233"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}