location /laravel {
alias /srv/www/html/laravel/public;
index index.php index.html;
}
location ~ /laravel/.+\.php.*$ {
if ($fastcgi_script_name ~ /laravel/(.+\.php.*)$) {
set $valid_fastcgi_script_name $1;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/html/laravel/public/$valid_fastcgi_script_name;
include fastcgi_params;
}
写在server内