【问题标题】:Apache DocumentRoot ConfigurationApache DocumentRoot 配置
【发布时间】:2016-01-11 03:33:20
【问题描述】:

我在我们的一个 RHEL6 Box 中安装了 Apache HTTP 服务器。

Server version: Apache/2.2.15 (Unix)
Server built:   Jul 18 2014 02:31:29
-D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"

我只需要提供一个 FTP 类型的页面,它允许下载托管在 DocumentRoot 目录中的文件。这些是我在 httpd.conf 中修改的行。 当我输入主机名而不是列出 DocumentRoot /hosting/apps/software-packages 中的所有目录时,它会显示以下测试页面。 但是我可以通过 URL 访问 DocumentRoot 的子目录,如下面的屏幕所示。

DocumentRoot "/hosting/apps/software-packages"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/hosting/apps/software-packages">
    Options Indexes FollowSymLinks
    AllowOverride None

</Directory>

FTP Look a like application in java/HTML

而且var中没有html文件。

$ l
total 16
drwxr-xr-x 2 root root 4096 Jul 18  2014 html
drwxr-xr-x 2 root root 4096 Jul 18  2014 cgi-bin
drwxr-xr-x 3 root root 4096 Oct 12 06:44 error
drwxr-xr-x 3 root root 4096 Oct 12 06:44 icons

DIR=/var/www
$ l html/
total 0

 DIR=/var/www

【问题讨论】:

    标签: apache apache2 httpd.conf rhel apache2.4


    【解决方案1】:

    改变 选项 FollowSymLinks 成为 选项 FollowSymLinks 索引

    【讨论】:

      猜你喜欢
      • 2015-03-18
      • 1970-01-01
      • 2011-05-31
      • 2014-06-25
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      • 2011-02-26
      • 2012-03-22
      相关资源
      最近更新 更多