linux下安装laravel项目

1:上传代码到服务器
2:composer安装:composer install
3:拷贝.env.example文件成.env
4:给storage/logs文件夹读写的权限
5:访问域名:
在这里插入图片描述
加上public访问成功
在这里插入图片描述
没有指向项目的public目录
在这里插入图片描述
修改vhost下的域名文件,重新加载配置文件即可生效

 location / {
                try_files $uri $uri/ /index.php?$query_string;
        }

在这里插入图片描述

lnmp集成环境 如果linux服务器下碰到错误:
Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/vem/public/…/vendor/autoload.php) is not within the allowed path
修改:/usr/local/nginx/conf/fastcgi.conf配置中的open_basedir=NULL,重启nginx
在这里插入图片描述

composer 安装报错: The Process class relies on proc_open, which is not available on your PHP installation.
在php.ini中搜索disable_function找到proc_open删除即可

  • 报错: No application encryption key has been specified
php artisan key:generate
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值