使用root用户,切换至: ce /etc/apache2/sites-available 目录中 vim ./000-default.conf 查找DocumentRoot /var/www/ 修改为你想要的目录 比如:DocumentRoot /home/duchaoqun/apache2 重启apache2服务: /etc/init.d/apache2 restart