linux服务器端系统是Ubuntu 14.04
修改根目录:
在 /etc/apache2/sites-available 中修改 000-default.conf
中的DocumentRoot /var/www/ 修改为想要的目录
比如:DocumentRoot /var/www/html/mainpage
接下来重启apache,sudo apache2ctl -k restart即可
重启过程遇到:
Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
/etc/apache2/sites-available 中修改 000-default.conf 最上方加入
ServerName localhost:80