{"id":410,"title":"thinkphp5\u8def\u7531\u4e0d\u751f\u6548\u4e00\u76f4\u8df3\u5230\u9996\u9875\u7684\u89e3\u51b3\u65b9\u6cd5","good":0,"bad":0,"hit":2724,"created_at":"2018-12-16 23:45:48","content":"

\u81ea\u4ece\u7528laravel\u6846\u67b6\u540e\uff0c\u597d\u4e45\u6ca1\u7528\u8fc7thinkphp\u6846\u67b6\u4e86\uff0c\u65e9\u671f\u7528\u76843.x\u7cfb\u5217\uff0c\u60f3\u719f\u6089\u4e00\u4e0bthinkphp5\uff0c\u7ed3\u679c\u5165\u5751\u4e86\uff1b<\/p>

\u8def\u7531\u914d\u7f6e\u4e00\u76f4\u4e0d\u8d77\u4f5c\u7528\uff0c\u603b\u662f\u8df3\u5230\u9996\u9875\uff0c\u6298\u817e\u4e86\u597d\u4e45\uff0c\u540e\u6765\u53d1\u73b0\u662fnginx\u914d\u7f6e\u7684\u95ee\u9898\uff0c\u627e\u4e86\u597d\u591a\u6587\u7ae0\u540e\u6765\u53d1\u73b0\u5b98\u65b9\u6587\u6863\u4e0a\u662f\u6709\u8bf4\u660e\u7684\uff0c\u53ea\u662f\u9690\u85cf\u5f97\u6bd4\u8f83\u6df1\uff0c\u6ca1\u6ce8\u610f\u770b\uff1b\u52a0\u4e0a\u52a0\u7c97\u90e8\u5206\u7684\u914d\u7f6e\u5c31\u597d\u4e86<\/p>

<\/p>

server {<\/p>

    listen       80;<\/p>

    server_name  www.hu-rong.com<\/a>;<\/p>

<\/p>

    location \/ {<\/p>

        root   \/share\/tp5_app\/public;<\/p>

        index  index.php index.html index.htm;<\/p>

\t<\/span>try_files $uri $uri\/ \/index.php?$query_string;<\/p>

\t<\/span>#pathinfo\u652f\u6301<\/strong><\/p>

\t<\/span>if (!-e $request_filename) {<\/strong><\/p>

   \t\t<\/span>rewrite  ^(.*)$  \/index.php?s=\/$1  last;<\/strong><\/p>

  \t\t<\/span> break;<\/strong><\/p>

   \t<\/span>}<\/strong><\/p>

    }<\/p>

<\/p>

    location ~ \\.php$ {<\/p>

        root           html;<\/p>

        fastcgi_pass   127.0.0.1:9000;<\/p>

        fastcgi_index  index.php;<\/p>

        fastcgi_param  SCRIPT_FILENAME  \/share\/tp5_app\/public$fastcgi_script_name;<\/p>

        include        fastcgi_params;<\/p>

    }<\/p>

<\/p>

    location ~ \/\\.ht {<\/p>

        deny  all;<\/p>

    }<\/p>

}<\/p>

<\/p>"}