{"id":667,"date":"2022-03-26T00:59:36","date_gmt":"2022-03-26T00:59:36","guid":{"rendered":"http:\/\/robinluo.top\/?p=667"},"modified":"2023-06-08T11:12:22","modified_gmt":"2023-06-08T11:12:22","slug":"nginx-%e4%b8%8b-laravel-%e9%83%a8%e7%bd%b2","status":"publish","type":"post","link":"https:\/\/robinluo.top\/?p=667","title":{"rendered":"nginx \u4e0b laravel \u90e8\u7f72"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>server {\n                listen       8080;\n                server_name  laravel.localhost;\n\n                client_max_body_size 10M;\n                # Load configuration files for the default server block.\n\n                \n\n                location \/ {\n                        root           D:\/\/robin-admin\/public;\n                        index  index.html index.htm index.php;\n                        try_files $uri $uri\/ \/index.php?$query_string;\n                }\n\n                location ~ \\.php$ {\n                    root           D:\/\/robin-admin\/public;\n                    fastcgi_pass   127.0.0.1:9000;\n                    fastcgi_index  index.php;\n                    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;\n                    include        fastcgi_params;\n                }\n\n                error_page 404 \/404.html;\n                        location = \/40x.html {\n                }\n\n                error_page 500 502 503 504 \/50x.html;\n                        location = \/50x.html {\n                }\n    }<\/code><\/pre>\n\n\n\n<p>nginx \u6839\u76ee\u5f55\u6307\u5411laravel \u7684\u4e0b\u7684public \u6587\u4ef6\u5939<\/p>\n\n\n\n<p>try_files $uri $uri\/ \/index.php?$query_string;  \u53ef\u4ee5\u6709\u6548\u91cd\u65b0\u8bbf\u95ee\u540e\u7f00\uff08\u4e0d\u9700\u8981\u663e\u5f0f\u6307\u660ephp\u540e\u7f00\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>nginx \u6839\u76ee\u5f55\u6307\u5411laravel \u7684\u4e0b\u7684public \u6587\u4ef6\u5939 try_files $uri $uri\/ \/index.php?$query_string; \u53ef\u4ee5\u6709\u6548\u91cd\u65b0\u8bbf\u95ee\u540e\u7f00\uff08\u4e0d\u9700\u8981\u663e\u5f0f\u6307\u660ephp\u540e\u7f00\uff09<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27,6],"tags":[10],"_links":{"self":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/667"}],"collection":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=667"}],"version-history":[{"count":3,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/667\/revisions"}],"predecessor-version":[{"id":897,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/667\/revisions\/897"}],"wp:attachment":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}