{"id":157299,"date":"2020-09-21T18:44:43","date_gmt":"2020-09-21T10:44:43","guid":{"rendered":"http:\/\/4563.org\/?p=157299"},"modified":"2020-09-21T18:44:43","modified_gmt":"2020-09-21T10:44:43","slug":"wordpress-nginx%e8%a7%84%e5%88%99%e6%b1%82%e5%8a%a9%e5%a4%a7%e4%bd%ac%e4%bb%ac","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=157299","title":{"rendered":"wordpress nginx\u89c4\u5219\u6c42\u52a9\u5927\u4f6c\u4eec"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>cyclists<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>wordpress nginx\u89c4\u5219\u6c42\u52a9\u5927\u4f6c\u4eec<\/h3>\n<p>  \t\t\u65e0\u610f\u95f4\u53d1\u73b0\u8bbf\u95ee\u7f51\u7ad9xxx.com\/aaazajns\u65f6\uff0c\u81ea\u52a8\u52a0\u659c\u6760\u53d8\u6210xxx.com\/aaazajns\/\u4f9d\u7136\u53ef\u4ee5\u8bbf\u95ee\u4e3b\u9875\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5939\u90fd\u4e0d\u5b58\u5728\uff0c\u628a\u90a3aaa\u4e00\u4e32\u5b57\u7b26\u6539\u6210\u4efb\u610f\u5b57\u6bcd\u4e0d\u5e26\u659c\u6760\u8bbf\u95ee\uff0c\u53c8\u81ea\u52a8\u52a0\u4e86\u659c\u6760\u76f4\u63a5\u6b63\u5e38\u8bbf\u95ee\u4e3b\u9875\uff0c\u521a\u5f00\u59cb\u4ee5\u4e3a\u662f\u4e3b\u9898\u7684\u9505\uff0c\u6362\u4e86wp\u5b98\u65b9\u7684\u4e3b\u9898\u4e5f\u662f\u8fd9\u6837\uff0c\u5168\u90e8\u63d2\u4ef6\u505c\u7528\u8fd8\u662f\u8fd9\u6837\u3002<\/p>\n<p>  \u6309\u7167\u6b63\u5e38\u6765\u8bf4\uff0c\u8bbf\u95ee\u7f51\u7ad9\u4e0d\u5b58\u5728\u7684\u76ee\u5f55\u6216\u6587\u4ef6\u4f1a\u7981\u6b62\u8bbf\u95ee\u8df3\u8f6c\u5230404\uff0c\u6211\u8fd9\u7279\u4e48\u8fd8\u81ea\u52a8\u52a0\u4e86\u659c\u6760\u76f4\u63a5\u6b63\u5e38\u8bbf\u95ee\u9996\u9875\u4e86\u3002\u7528\u7684\u519b\u54e5lnmp \uff0cwordpress\u4e3a\u9759\u6001\u90fd\u662f\u519b\u54e5\u9ed8\u8ba4\u7684\uff0cwp5.5.1,nginx1.18\u7248\u672c\uff0c\u90fd\u6ca1\u6539\u52a8\u914d\u7f6e<\/p>\n<p>  \u7f51\u7ad9\u914d\u7f6e<br \/>  server<br \/>  &nbsp; &nbsp; {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;listen 80;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;#listen [::]:80;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;server_name xxxo.com;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;charset utf-8;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;rewrite ^\/(.*) https:\/\/xxxo.com\/$1 permanent;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;index index.html index.htm index.php default.html default.htm default.php;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;root\/home\/website;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;include \/usr\/local\/nginx\/rocket-nginx\/default.conf;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;include rewrite\/wordpress.conf;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;#error_page&nbsp; &nbsp;404&nbsp; &nbsp;\/404.html;<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;# Deny access to PHP files in specific directory<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;#location ~ \/(wp-content|uploads|wp-includes|images)\/.*.php$ { deny all; }<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;include enable-php-pathinfo.conf;<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;{<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;expires&nbsp; &nbsp;&nbsp; &nbsp;30d;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;location ~ .*.(js|css)?$<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;{<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;expires&nbsp; &nbsp;&nbsp; &nbsp;12h;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;access_log off;<br \/>  &nbsp; &nbsp; }<br \/>  server<br \/>  &nbsp; &nbsp; {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;listen 443 ssl http2;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;#listen [::]:443 ssl http2;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;server_name xxx.com;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;charset utf-8;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;index index.html index.htm index.php default.html default.htm default.php;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;root\/home\/website;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; location ~ .*.(gif|jpg|jpeg|png|bmp|swf|mp4)$<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;{<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;valid_referers none blocked xxx.com;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if ($invalid_referer) <br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;{<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;rewrite ^\/ https:\/\/xxx.com\/usr\/uploads\/mov\/404.PNG;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return 404;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;}<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; }<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp; <br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_certificate \/usr\/ssl\/inwao.ecc.pem;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_certificate_key \/usr\/ssl\/private.key;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_certificate \/usr\/ssl\/xxxo.com.crt;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_certificate_key \/usr\/ssl\/xxxo.com.key;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; ssl_stapling on;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_stapling_verify on;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_trusted_certificate \/usr\/ssl\/xxxao.com.crt;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_session_timeout 5m;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_protocolsTLSv1.2 TLSv1.3;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_prefer_server_ciphers on;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_ciphers &quot;TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AES128:EECDH+aRSA+AES128:RSA+AES128:EECDH+ECDSA+AES256:EECDH+aRSA+AES256:RSA+AES256:EECDH+ECDSA+3DES:EECDH+aRSA+3DES:RSA+3DES:!MD5&quot;;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_session_cache builtin:1000 shared:SSL:10m;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;# openssl dhparam -out \/usr\/local\/nginx\/conf\/ssl\/dhparam.pem 2048<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;ssl_dhparam \/usr\/local\/nginx\/conf\/ssl\/dhparam.pem;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;add_header Strict-Transport-Security &quot;max-age=63072000; includeSubdomains; preload&quot;;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;include \/usr\/local\/nginx\/rocket-nginx\/default.conf;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;include rewrite\/wordpress.conf;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;#error_page&nbsp; &nbsp;404&nbsp; &nbsp;\/404.html;<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;# Deny access to PHP files in specific directory<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;#location ~ \/(wp-content|uploads|wp-includes|images)\/.*.php$ { deny all; }<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;include enable-php-pathinfo.conf;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;{<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;expires&nbsp; &nbsp;&nbsp; &nbsp;30d;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<br \/>  &nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;location ~ .*.(js|css)?$<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;{<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;expires&nbsp; &nbsp;&nbsp; &nbsp;12h;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;access_log off;<br \/>  &nbsp; &nbsp; }  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>llmwxt<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\twa\uff0c\u597d\u957f\uff0c18CM\u5dee\u4e0d\u591a\u4e86<\/p>\n<p>  \u53ef\u60dc\u4e00\u70b9\u4e0d\u61c2\uff01\uff01<\/p>\n<p>  \u5e2e\u9876\uff0c\u7b49\u6280\u672f\u5927\u4f6c\u4eec\uff01<\/p>\n<p>  :time::time::time:\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Vickers<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tllmwxt \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-9-21 10:07<br \/>  wa\uff0c\u597d\u957f\uff0c18CM\u5dee\u4e0d\u591a\u4e86<\/p>\n<p>  \u53ef\u60dc\u4e00\u70b9\u4e0d\u61c2\uff01\uff01<\/p>\n<p> \u5927\u4f6c\uff0c\u548b\u54ea\u90fd\u6709\u4f60\u3002\u65e0\u5904\u4e0d\u5728:lol\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>llmwxt<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tVickers \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-9-21 10:22<br \/>  \u5927\u4f6c\uff0c\u548b\u54ea\u90fd\u6709\u4f60\u3002\u65e0\u5904\u4e0d\u5728<\/p>\n<p> \u563f\u563f\uff0c\u6211\u95f2\u4eba\u554a\uff01\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>tangwd<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e0d\u61c2\u6280\u672f\uff0c\u5e2e\u9876\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u80d6\u864e<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6211\u62ff\u81ea\u5df1\u535a\u5ba2\u8bd5\u4e86\u8bd5\u8df3404 \uff0clnmp1.6\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>iks<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4f2a\u9759\u6001\uff0c\u8f6c\u53d1\u5230index\u540e\u88ab\u8865\u9f50\u7684\uff0c\u5b57\u6570\u8865\u4e01\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cyclists<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tiks \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-9-21 11:18<br \/>  \u4f2a\u9759\u6001\uff0c\u8f6c\u53d1\u5230index\u540e\u88ab\u8865\u9f50\u7684\uff0c\u5b57\u6570\u8865\u4e01<\/p>\n<p> \u548b\u641e\uff0c\u5927\u4f6c\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>malaohu<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tinclude rewrite\/wordpress.conf;<\/p>\n<p>  \u8fd9\u4e2a\u91cc\u9762\u662f\u5565\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cyclists<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tmalaohu \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-9-21 18:40<br \/>  \u8fd9\u4e2a\u91cc\u9762\u662f\u5565<\/p>\n<p> \u4e3a\u9759\u6001\u6587\u4ef6<\/p>\n<p>  location \/ {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;try_files $uri $uri\/ \/index.php?$args;<br \/>  }<\/p>\n<p>  # Add trailing slash to *\/wp-admin requests.<br \/>  rewrite \/wp-admin$ $scheme:\/\/$host$uri\/ permanent;\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>cyclists \u5927\u4f6c\u6709\u8bdd\u8bf4 : &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\/157299"}],"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=157299"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/157299\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157299"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}