簡體   English   中英

Apache DocumentRoot配置

[英]Apache DocumentRoot Configuration

我在我們的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目錄中托管的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在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

將Options FollowSymLinks更改為Options FollowSymLinks索引

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM