Ubuntu 14.04下 Apache修改网站根目录及默认网页

这里写图片描述

接下来重启apache,sudo apache2ctl -k restart 即可

修改默认网页:
修改/etc/apache2/mods-available/dir.conf中的内容
原来是:

<IfModule mod_dir.c>
    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

添加上想要的/wordpress就行啦~

<IfModule mod_dir.c>
    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm /wordpress
</IfModule>

Apache 的详细介绍请点这里
Apache 的下载地址请点这里

猜你喜欢

转载自www.linuxidc.com/Linux/2015-07/120724.htm
今日推荐