更改Apache的首页

本机Apache的安装过程请见:

Apache的首页是由/usr/local/httpd/conf/httpd.conf文件的DocumentRoot决定的。

...
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.

...

让我们再去/usr/local/apache2/htdocs目录里看看。

[root@bogon conf]# cd /usr/local/apache2/htdocs
[root@bogon htdocs]#
[root@bogon htdocs]# ls
index.html

只有一个index.html显示出来,让我们把它修改下:

[root@bogon htdocs]# vi index.html
<html><title>Apache Title</title><body><h1>Congratulations!Apache works!</h1><br/><h2>2013-08-29</h2></body></html>

然后再访问下看看:

是预想的效果。可以了。

《全文完》

转载于:https://www.cnblogs.com/xiandedanteng/p/3290533.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值