lnmp部署项目常见问题(搭建虚拟主机)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Bepthslowly/article/details/79511240

1、500

如果是用 lnmp vhost add 命令 添加的虚拟域名 会在根目录生成 .user.ini(防跨目录设置) 这个.user.ini 一定要删掉,不然怎么配置都是报错500

chattr -i .user.ini
rm .user.ini
LNMP 1.4上如果不想用防跨目录或者修改.user.ini的防跨目录的目录还需要将 
/usr/local/nginx/conf/fastcgi.conf 里面的
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; 
在该行行前添加 # 或删除改行,需要重启nginx。

修改权限试试

chmod -R 777 storage

更新composer

composer update
cache directory must be present and writable
php artisan cache:clear
No application encryption key has been specified.
php artisan key:generate

2、404

include laravel.conf;

3、只能访问首页,其他页面404

include laravel.conf;

猜你喜欢

转载自blog.csdn.net/Bepthslowly/article/details/79511240