• 更改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>

    然后再访问下看看:

    是预想的效果。可以了。

    《全文完》

  • 相关阅读:
    10多媒体
    胡凡-01
    概念
    算法
    07Axios
    05VueCli
    04Vue.js路由系统
    03生命周期
    《穷人思维》学习感悟
    《基金》学习感悟之二
  • 原文地址:https://www.cnblogs.com/heyang78/p/3290533.html
Copyright © 2020-2023  润新知