linux centos7 lnmp nginx + laravel5.1设置重定向

server {
listen 80;
server_name example.com;
location / {
root /data/lnmp/nginx/burj/public;
try_files $uri $uri/ /index.php?$query_string;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /data/lnmp/nginx/burj/public;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /data/lnmp/nginx/html/laravel/public;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /data/lnmp/nginx/burj/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

https://laravel-china.org/topics/1247 这是别人写好的,挺完整的转载过来,感谢他的分享
如果还出错,那就是权限的问题