Ubuntu 部署 Yii2 遇到的坑

var/www 目录下 git clone 没有权限

amazon教程

apache vhosts 配置

1
2
3
4
5
6
7
8
9
10
<VirtualHost *:80>
ServerName test.zchi.me
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/vue2-in-yii2/frontend/web
</VirtualHost>
<VirtualHost *:80>
ServerName admin.zchi.me
ServerAdmin i@zchi
DocumentRoot /var/www/html/vue2-in-yii2/backend/web
</VirtualHost>

apache rewrite 模式未开启

sudo a2enmod rewrite