首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Apache DocumentRoot配置

Apache DocumentRoot配置
EN

Stack Overflow用户
提问于 2015-10-13 19:39:43
回答 1查看 684关注 0票数 0

我有Apache HTTP服务器安装在我们的RHEL6盒之一。

代码语言:javascript
复制
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中的文件directory.These是我在httpd.conf中修改的行。当我输入主机名,而不是列出DocumentRoot / host /apps/software-packages中的所有目录时,它会显示以下测试页面。但是我可以通过URL访问DocumentRoot的子目录,如下面的屏幕所示。

代码语言:javascript
复制
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文件。

代码语言:javascript
复制
$ 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
EN

回答 1

Stack Overflow用户

发布于 2015-10-31 11:22:39

将选项索引更改为Options FollowSymLinks FollowSymLinks

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33101724

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档