ubuntu apache缺少配置

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

猜你喜欢

转载自blog.csdn.net/qq_39399594/article/details/79982762