分类:Linux日志 发布时间:2017-10-24 10:21:59 阅读: 作者:郑祥景
Laravel
server { listen 80; root /home/www/laravel/public; server_name laravel.app; index index.html index.php; location / { try_files $uri $uri/ /index.php?$args; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { include fastcgi_params; fastcgi_index index.php; fastcgi_pass unix:/run/php/php7.1-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~ /\.ht { deny all; } }
Thinkphp
server { listen 80; server_name thinkphp.app; root /home/www/thinkphp; index index.html index.php; location / { try_files $uri $uri/ /index.php?$args; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { include fastcgi_params; fastcgi_index index.php; fastcgi_pass unix:/run/php/php7.1-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~ /\.ht { deny all; } }
编辑:郑祥景