AH01630:服务器配置.htaccess拒绝客户端 [英] AH01630: client denied by server configuration .htaccess

查看:59
本文介绍了AH01630:服务器配置.htaccess拒绝客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到此错误,但我无法解决.我输入

I'm having this error, and i can't solve it. I type

tail -f/usr/local/apache/logs/error_log

tail -f /usr/local/apache/logs/error_log

在cpanel终端上,我收到以下错误消息:

on cpanel terminal and I receive the following error:

[authz_core:错误] [pid 10250]

[authz_core:error] [pid 10250]

这是我的.htaccess代码:

here's my .htaccess code:

<IfModule authz_core_module>
    Require all granted
</IfModule>
<IfModule !authz_core_module>
    Require all denied
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

我无法在我的vps服务器(hostgator Apache 2.4.41)中打开php文件,而不是打开文件,而是下载了该文件.

I'm not being able to open php files in my vps server(hostgator Apache 2.4.41), instead of opening the file, it is downloaded.

推荐答案

这对我有用,请根据您的要求对其进行编辑

This isworking for me, edit it to your requirements

</VirtualHost>
<Directory /var/www/html/example.com/public_html>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule>

客户端被服务器配置拒绝

此错误意味着Apache配置拒绝了对文件系统上目录的访问.

This error means that the access to the directory on the file system was denied by an Apache configuration.

开始之前

在尝试更改任何现有的配置文件之前,请注意拒绝访问的完整文件系统路径以及客户端的IP或主机名:

Before attempting to alter any existing config file, please take note of the full file system path for which access is being denied, and the IP or hostname of the client:

[<date here>] [error] [client ::1] client denied by server configuration: /var/www/example.com/

对于以下示例,在目录块中使用正确的路径对于解决此问题至关重要.在这种情况下,本地计算机(:: 1)的客户端将被拒绝访问 [/var/www/example.com] [1] .

Using the correct path in the directory block for the following examples is essential to solving this problem. In this case, a client from the local machine (::1) is being denied access to [/var/www/example.com][1] .

类似的东西应该可以解决您的问题:

Something like this should resolve your problem :

<Directory /var/www/example.com>
  Order allow,deny
  Allow from all
</Directory>

或者这个

<Directory /var/www/example.com>
  Order allow,deny
  Allow from all
  Require all granted
</Directory>

更多说明:

https://cwiki.apache.org/confluence/display/httpd/ClientDeniedByServerConfiguration

这篇关于AH01630:服务器配置.htaccess拒绝客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆