Never Nop Tech

Never Nop Tech

分享軟體、旅遊、生活。

Laravel Nginx設定檔

Laravel Nginx設定檔

內容如下:

server {
    # ...

    # 設定 php 檔案處理方式
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
    }

    # ...
}

參考資料:
http://kejyun.github.io/Laravel-5-Learning-Notes-Books/hosting/hosting-install-php7.html