开发者社区> 问答> 正文

centos7中装好apache后想改目录能行吗

我事先在/根下建了一个目录 /wwwroot/www
然后我修改了一下httpd.conf中的配置文件
DocumentRoot "/wwwroot/www"


#
# Relax access to content within /var/www.
#
<Directory "/wwwroot/www">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>


# Further relax access to the default document root:
<Directory "/wwwroot/www">
    #
    # 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.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks


    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None


    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

并且也重启了apache服务了,但是结果是不能访问,即无法显示此网页,
不知哪里出了问题呢

展开
收起
紫罗袍 2015-04-16 12:02:57 6957 0
1 条回答
写回答
取消 提交回答
  • 旺旺:nectar2。
    楼主您好,

    如果浏览器提示“无法显示此网页”,有可能apache的服务没有成功运行喔。

    建议先检查apache的web进程是否在正常运行中。

    祝您早日解决问题。
    2015-04-16 12:31:51
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Flink 案例集(2022版) 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载