新建虛擬主機
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName Ubuntuuc.cc ServerAlias ubuntuc.cc DocumentRoot /vagrant/public/uc/public ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>修改hosts
127.0.0.1 ubuntuuc.cc開啟主機重寫(.htaccess)支持
sudo a2enmod rewrite sudo vim /etc/apache2/mods-enabled/rewrite.load #進去開啟修改apache配置文件
<Directory /> Options FollowSymLinks AllowOverride All #All才會使用帶主機重寫 Require all granted #granted才能訪問到網站</Directory>重啟apache2
sudo service apache2 restart新聞熱點
疑難解答