Linux服务器端系统是Ubuntu 14.04
修改根目录:
在 /etc/apache2/sites-available 中修改 000-default.conf
中的DocumentRoot /var/www/ 修改为想要的目录
比如:DocumentRoot /var/www/html/mainpage
这里写图片描述
接下来重启apache,sudo apache2ctl -k restart 即可
重启apache:
sudo /etc/init.d/apache2 restart
注:同目录下有default-ssl.conf文件,其中DocumentRoot /var/www/html也一并改过了,不知道不该回怎么样。
修改默认网页: (未操作)
修改/etc/apache2/mods-available/dir.conf中的内容
原来是:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
添加上想要的/wordpress就行啦~
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm /wordpress