lnmp.org一键安装包安装laravel 解决403、白屏
lnmp版本是1.7 下载安装:wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./install.sh lnmp
官网地址:https://lnmp.org/install.html
首先我们打开错误提示,方便解决问题:
#vi /usr/local/php/etc/php.ini
修改:display_errors = On (原先是off)
display_startup_errors = On (原先是off)
nginx配置如下:
server {
listen 80;
server_name 你的域名;
root "/home/wwwroot/项目地址/public";
index index.php index.html index.htm;
include rewrite/laravel.conf;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
error_log /home/wwwlogs/error.log error;
}
修改open_basedir配置
注释掉 usr/local/nginx/conf/fastcgi.conf 中PHP_ADMIN_VALUE 值的设置
# fastcgi_param PHP_ADMIN_VALUE “open_basedir=$document_root/:/tmp/:/proc/:/home/wwwroot/”;
记住一点 .env 中APP_NAME的值一定要加”双引号,否则会出现白屏
噢!评论已关闭。