{"id":171,"date":"2019-09-01T16:35:59","date_gmt":"2019-09-01T08:35:59","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=171"},"modified":"2020-09-27T19:58:10","modified_gmt":"2020-09-27T11:58:10","slug":"centos7-nginx-php-%e7%8e%af%e5%a2%83%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=171","title":{"rendered":"centos7, nginx, php \u73af\u5883\u914d\u7f6e"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>    server {\n        listen       80;\n        server_name  xx.xx.cn;\n        root         \/data\/xxx;\n        index index.html index.htm index.php;\n        location \/ {\n            try_files $uri $uri\/ \/index.php$is_args$args;\n        }\n        location ~ \\.php$ {\n            try_files $uri =404;\n            include fastcgi.conf;\n            fastcgi_pass 127.0.0.1:9000;\n        }<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5982\u679c\u8981\u72ec\u7acb\u914d\u7f6e\u591a\u4e2a\u57df\u540d\uff0c\u5219\uff1a\n\nvi \/etc\/nginx\/nginx.conf\n\nserver {\n   listen       80;\n   server_name  xx1.xx.cn;\n   root         \/data\/www;\n}\n\nserver {\n   listen       80;\n   server_name  xx2.xx.cn;\n   root         \/data\/www2;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/171"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=171"}],"version-history":[{"count":2,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/171\/revisions"}],"predecessor-version":[{"id":173,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/171\/revisions\/173"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}