Apache不需要ip isn';不允许我重新启动httpd
我正在运行Apache2.4,试图阻止Web服务器上的IP地址,这是一个Cent OS 8服务器,我正在编辑Apache不需要ip isn';不允许我重新启动httpd,apache,.htaccess,Apache,.htaccess,我正在运行Apache2.4,试图阻止Web服务器上的IP地址,这是一个Cent OS 8服务器,我正在编辑httpd.conf文件,但由于某些原因,在尝试阻止IP并重新启动httpd时,我得到了一个失败退出代码 我错过了什么 # # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # &
httpd.conf
文件,但由于某些原因,在尝试阻止IP并重新启动httpd时,我得到了一个失败退出代码
我错过了什么
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/MY-SITE/dist"
#
# Relax access to content within /var/www.
#
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
# Further relax access to the default document root:
<Directory "/var/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 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 All
#
# Controls who can get stuff from this server.
#
<RequireAll>
Require all granted
Require not ip X.X.X.X
</RequireAll>
# Header set Access-Control-Allow-Origin "*"
</Directory>
#
#拒绝访问服务器的整个文件系统。你必须
#明确允许访问其他目录中的web内容目录
#下面的街区。
#
不允许超限
要求全部拒绝
#
#请注意,从这一点开始,您必须特别允许
#要启用的特定功能-因此如果某些功能无法正常工作
#您可能希望,确保您已经专门启用了它
#下面。
#
#
#DocumentRoot:您将从中提供服务的目录
#文件。默认情况下,所有请求都来自此目录,但
#符号链接和别名可用于指向其他位置。
#
DocumentRoot“/var/www/MY-SITE/dist”
#
#放宽对/var/www内内容的访问。
#
不允许超限
#允许开放访问:
要求所有授权
#进一步放宽对默认文档根目录的访问:
#
#选项指令的可能值为“无”、“全部”,
#或以下任何组合:
#索引包括以下符号链接符号链接所有者匹配执行CGI多视图
#
#请注意,“多视图”必须显式命名为*--“所有选项”
#不给你。
#
#期权指令既复杂又重要。请看
# http://httpd.apache.org/docs/2.4/mod/core.html#options
#了解更多信息。
#
选项如下符号链接
#
#AllowOverride控制可在.htaccess文件中放置的指令。
#它可以是“全部”、“无”或关键字的任意组合:
#选项FileInfo AuthConfig限制
#
允许超越所有
#
#控制谁可以从此服务器获取内容。
#
要求所有授权
不需要ip X.X.X.X
#标题集访问控制允许原点“*”
我只需添加以下内容即可获得ERORR:
不需要ip X.X.X.X
是:
那里的X.X.X.X是有效的IP吗?
X.X.X.X
只是为了隐私,实际的IP地址已经添加,这只是为了StackOverflow我知道。但是真正的Ip地址提到的正确吗?显示准确的错误line@Exampleperson附加的错误截图。是的,IP是正确的。它是:`5.39.190.244`这是完全正确的。