{"id":685,"date":"2010-03-11T01:14:59","date_gmt":"2010-03-10T17:14:59","guid":{"rendered":"http:\/\/pony.xin\/?p=685"},"modified":"2021-03-12T20:50:32","modified_gmt":"2021-03-12T12:50:32","slug":"nginx%e4%b8%8b%e5%a6%82%e4%bd%95%e8%87%aa%e5%ae%9a%e4%b9%89404%e9%a1%b5%e9%9d%a2","status":"publish","type":"post","link":"https:\/\/lnmp.ivan.xin\/?p=685","title":{"rendered":"NGINX\u4e0b\u5982\u4f55\u81ea\u5b9a\u4e49404\u9875\u9762"},"content":{"rendered":"<p>IIS\u548cAPACHE\u4e0b\u81ea\u5b9a\u4e49404\u9875\u9762\u7684\u7ecf\u9a8c\u4ecb\u7ecd\u6587\u7ae0\u5df2\u7ecf\u975e\u5e38\u591a\u4e86\uff0cNGINX\u7684\u76ee\u524d\u8fd8\u6bd4\u8f83\u5c11\uff0c\u51d1\u5de7\u6211\u7684\u51e0\u53f0\u670d\u52a1\u5668\u90fd\u662fNGINX\u7684\uff0c\u4e3a\u4e86\u89e3\u51b3\u81ea\u5bb6\u7684\u95ee\u9898\u7279\u5730\u5bf9\u6b64\u4f5c\u4e86\u6df1\u5165\u7684\u7814\u7a76\u3002\u7814\u7a76\u7ed3\u679c\u8868\u660e\uff0cNGINX\u4e0b\u914d\u7f6e\u81ea\u5b9a\u4e49\u7684404\u9875\u9762\u662f\u53ef\u884c\u7684\uff0c\u800c\u4e14\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u5982\u4e0b\u51e0\u6b65\uff1a<\/p>\n<p><em><strong>1.<\/strong><\/em>\u521b\u5efa\u81ea\u5df1\u7684404.html\u9875\u9762 <\/p>\n<p><em><strong>2.<\/strong><\/em>\u66f4\u6539nginx.conf\u5728http\u5b9a\u4e49\u533a\u57df\u52a0\u5165\uff1a <\/p>\n<blockquote>\n<p>fastcgi_intercept_errors on; <\/p>\n<\/blockquote>\n<p><strong><em>3.<\/em><\/strong>\u66f4\u6539nginx.conf\u5728server \u533a\u57df\u52a0\u5165\uff1a <\/p>\n<blockquote>\n<p>error_page 404 = \/404.html <\/p>\n<\/blockquote>\n<p><strong><em>4.<\/em><\/strong>\u6d4b\u8bd5nginx.conf\u6b63\u786e\u6027\uff1a <\/p>\n<blockquote>\n<p>\/opt\/nginx\/sbin\/nginx \u2013t <\/p>\n<p>\u5982\u679c\u6b63\u786e\u5e94\u8be5\u663e\u793a\u5982\u4e0b\u4fe1\u606f\uff1a<\/p>\n<p>the configuration file \/opt\/nginx\/conf\/nginx.conf syntax is ok      <br \/>configuration file \/opt\/nginx\/conf\/nginx.conf test is successful<\/p>\n<\/blockquote>\n<p><strong><em>5.<\/em><\/strong>\u91cd\u542fnginx<\/p>\n<ol>\n<li>kill -HUP&nbsp; `cat \/opt\/nginx\/nginx.pid ` <\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>IIS\u548cAPACHE\u4e0b\u81ea\u5b9a\u4e49404\u9875\u9762\u7684\u7ecf\u9a8c\u4ecb\u7ecd\u6587\u7ae0\u5df2\u7ecf\u975e\u5e38\u591a\u4e86\uff0cNGINX\u7684\u76ee\u524d\u8fd8\u6bd4\u8f83\u5c11\uff0c\u51d1\u5de7\u6211\u7684\u51e0\u53f0\u670d\u52a1\u5668...<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15329],"tags":[],"class_list":["post-685","post","type-post","status-publish","format-standard","hentry","category-nginx"],"_links":{"self":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=685"}],"version-history":[{"count":1,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":686,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/685\/revisions\/686"}],"wp:attachment":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}