{"id":285,"date":"2013-08-10T22:02:54","date_gmt":"2013-08-10T14:02:54","guid":{"rendered":"http:\/\/www.cyups.com\/?p=285"},"modified":"2013-08-10T22:02:54","modified_gmt":"2013-08-10T14:02:54","slug":"%e5%86%9b%e5%93%a5lnmp-%e4%b8%80%e9%94%ae%e5%ae%89%e8%a3%85%e5%8c%85-%e7%ae%80%e5%8d%95%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"http:\/\/www.cyups.com\/?p=285","title":{"rendered":"\u519b\u54e5Lnmp \u4e00\u952e\u5b89\u88c5\u5305 \u7b80\u5355\u53cd\u5411\u4ee3\u7406\u8bbe\u7f6e"},"content":{"rendered":"<p><a href=\"http:\/\/www.kwx.gd\/CentOSApp\/lnmp-base-reverse-proxy.html\" target=\"_blank\"  rel=\"nofollow\" >\u519b\u54e5Lnmp \u4e00\u952e\u5b89\u88c5\u5305 \u7b80\u5355\u53cd\u5411\u4ee3\u7406\u8bbe\u7f6e<\/a><br \/>\nNginx\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684HTTP\u548c\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u4f7f\u7528Nginx\uff0c\u53ea\u9700\u8981\u7b80\u5355\u7684\u51e0\u6761\u547d\u4ee4\u4fdd\u5b58\u5230\u6587\u4ef6\uff0c\u5373\u53ef\u5b9e\u73b0\u7b80\u5355\u3001\u57fa\u672c\u53cd\u5411\u4ee3\u7406\u529f\u80fd\u3002<br \/>\n<!--more--><br \/>\n\u8fd9\u91cc\u4ee5LNMP\u4e00\u952e\u5b89\u88c5\u5305\u4e3a\u4f8b\uff0c\u9996\u5148\u8bf7\u521b\u5efa\u4e3b\u673a\uff0c\u53c2\u8003\uff1a\u300a<a href=\"http:\/\/www.kwx.gd\/PHPEnvironment\/LNMP-Vhost.html\" target=\"_self\" rel=\"noopener noreferrer\" target=\"_blank\"  rel=\"nofollow\" >LNMP 0.7\u4e00\u952e\u5b89\u88c5\u5305 \u6dfb\u52a0\u4e0e\u5220\u9664\u865a\u62df\u4e3b\u673a<\/a>\u300b\u3002<\/p>\n<h3>\u4e00\u3001\u8fdb\u5165\u76f8\u5173\u76ee\u5f55<\/h3>\n<p>\u5982\u521b\u5efa\u4e00\u4e2a\u7f51\u5740\u4e3a\u201cwww.kwxonline.com\u201d\u7684\u865a\u62df\u4e3b\u673a<\/p>\n<pre lang=\"bash\">cd \/usr\/local\/nginx\/conf\/vhost<\/pre>\n<p>\u8fdb\u5165LNMP\u4e00\u952e\u5305\u7684\u865a\u62df\u4e3b\u673a\u914d\u7f6e\u6587\u4ef6\u5939\uff0c\u627e\u5230\u521a\u521a\u521b\u5efa\u7684\u201cwww.kwxonline.com.conf\u201d\u6587\u4ef6\uff0c\u5e76\u7f16\u8f91\u3002<\/p>\n<h3>\u4e8c\u3001\u6dfb\u52a0\u53cd\u5411\u4ee3\u7406\u89c4\u5219<\/h3>\n<p>\u5220\u9664\u4e4b\u524d\u7cfb\u7edf\u751f\u6210\u7684\u4ee3\u7801\uff0c\u586b\u5165\u4ee5\u4e0b\u4ee3\u7801\uff0c\u6ce8\u610f\u4fee\u6539\u9ec4\u8272\u90e8\u5206\u3002<\/p>\n<pre lang=\"bash\">server\n\t{\n    \tlisten          80;\n    \tserver_name     www.kwxonline.com;\n    \tlocation \/ {\n        proxy_pass          http:\/\/www.kwx.gd\/;\n        proxy_redirect      off;\n        proxy_set_header    X-Real-IP       $remote_addr;\n        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;\n        }\n}<\/pre>\n<p>\u4ee5\u4e0a\u4ee3\u7801\uff0c\u8868\u793a\u4f7f\u7528\u201cwww.kwxonline.com\u201d\u53cd\u5411\u4ee3\u7406\u201cwww.kwx.gd\u201d\uff0c\u7136\u540e\u4fdd\u5b58\u6587\u4ef6\u5373\u53ef\u3002<\/p>\n<h3>\u4e09\u3001\u6d4b\u8bd5<\/h3>\n<h4>1\u3001\u6d4b\u8bd5\u89c4\u5219\u662f\u5426\u6b63\u786e<\/h4>\n<pre lang=\"bash\">\/usr\/local\/nginx\/sbin\/nginx -t<\/pre>\n<p>\u82e5\u63d0\u793a\uff1a\u201cthe configuration file \/usr\/local\/nginx\/conf\/nginx.conf syntax is ok\u00a0 configuration file \/usr\/local\/nginx\/conf\/nginx.conf test is successful\u201d\u8868\u793a\u6b63\u5e38\uff0c\u82e5\u6709\u9519\u8bef\u8bf7\u6839\u636e\u9519\u8bef\u63d0\u793a\u6392\u9664\u95ee\u9898\u3002<\/p>\n<h4>2\u3001\u91cd\u8f7dnginx\u89c4\u5219<\/h4>\n<pre lang=\"bash\">service nginx reload<\/pre>\n<p>\u6267\u884c\u4ee5\u4e0a\u4ee3\u7801\u5373\u53ef\u751f\u6548\u3002<br \/>\n\u6807\u7b7e: <a href=\"http:\/\/www.kwx.gd\/tag\/LNMP\/\" target=\"_blank\"  rel=\"nofollow\" >LNMP<\/a>, <a href=\"http:\/\/www.kwx.gd\/tag\/%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86\/\" target=\"_blank\"  rel=\"nofollow\" >\u53cd\u5411\u4ee3\u7406<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u519b\u54e5Lnmp \u4e00\u952e\u5b89\u88c5\u5305 \u7b80\u5355\u53cd\u5411\u4ee3\u7406\u8bbe\u7f6e Nginx\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684HTTP\u548c\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u4f7f\u7528Nginx\uff0c\u53ea\u9700\u8981\u7b80\u5355\u7684\u51e0\u6761\u547d\u4ee4 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":110,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[8],"tags":[158],"class_list":["post-285","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-8","tag-lnmp"],"_links":{"self":[{"href":"http:\/\/www.cyups.com\/index.php?rest_route=\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.cyups.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cyups.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cyups.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cyups.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=285"}],"version-history":[{"count":0,"href":"http:\/\/www.cyups.com\/index.php?rest_route=\/wp\/v2\/posts\/285\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.cyups.com\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"http:\/\/www.cyups.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cyups.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cyups.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}