进入文件/etc/apache2/sites-enabled/
sudo touch yii2.conf //新建文件
sudo service apache2 restart //重启服务
sudo service php5-fpm restart
sudo /etc/init.d/php5-fpm restart //重启PHP服务