zoukankan      html  css  js  c++  java
  • 更改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>

    然后再访问下看看:

    是预想的效果。可以了。

    《全文完》

  • 相关阅读:
    3.1 history跳转页面产生跨域问题
    2021年6月7日 团队冲刺第二阶段04
    2021年6月6日 团队冲刺第二阶段03
    2021年6月5日 团队冲刺第二阶段02
    2021年6月4日 团队冲刺第二阶段01
    2021年6月3日
    2021年6月2日
    2021年6月1日
    2021年5月31日
    2021年5月30日
  • 原文地址:https://www.cnblogs.com/heyang78/p/3290533.html
Copyright © 2011-2022 走看看