gpt4 book ai didi

apache - 为什么可以从apache访问我的根目录?

转载 作者:行者123 更新时间:2023-12-01 15:41:36 27 4
gpt4 key购买 nike

当我突然发现浏览器只需在地址中键入“/”即可访问我的根目录时,我在玩耍。我检查了httpd.conf,它明确指出:

<Directory "/">
AllowOverride none
Require all denied
</Directory>

我在Fedora 29上,这是我的httpd.conf:
ServerRoot "/etc/httpd"

Listen 80
LimitRequestBody 5242880

Include conf.modules.d/*.conf

User apache
Group apache

ServerAdmin root@localhost

<Directory "/">
AllowOverride none
Require all denied
</Directory>

DocumentRoot "/var/www/html"

<Directory "/var/www">
LimitRequestBody 5242880
AllowOverride None
Require all granted
</Directory>

<Directory "/var/www/html">
LimitRequestBody 5242880

Options Indexes FollowSymLinks

AllowOverride None

Require all granted
</Directory>

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

<Files ".ht*">
Require all denied
</Files>

ErrorLog "logs/error_log"

LogLevel warn

<IfModule log_config_module>

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>

<Directory "/var/www/cgi-bin">
LimitRequestBody 5242880
AllowOverride None
Options +ExecCGI
Require all granted
SetHandler fcgid-script
</Directory>

<IfModule mime_module>

TypesConfig /etc/mime.types

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>

AddDefaultCharset UTF-8

<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>

EnableSendfile on

IncludeOptional conf.d/*.conf

LimitRequestBody 1024000

<Directory "/var/www/cgi-bin/data">
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Directory>

为什么会这样呢?

最佳答案

我的根目录没有被apache访问。这是文件uri参数。

关于apache - 为什么可以从apache访问我的根目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55774000/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com