1.修改主机hosts文件配置 重定向
sudo gedit /etc/hosts
127.0.1.1 [www.haidao.com](http://www.haidao.com/)
2.配置虚拟主机路径设置
sudo gedit /etc/apache2/sites-available/demo.conf (deepin测试有效 需要修改这个设置)
sudo gedit /etc/apache2/sites-available/000-default.conf(Kubuntu需要修改这个设置)
<VirtualHost *:80>
DocumentRoot /var/www/haidao
ServerName www.haidao.com
<Directory "/var/www/haidao">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
3.重启apache
sudo /etc/init.d/apache2 restart