Thiago Robles
Thiago Robles

Reputation: 76

AH01630: client denied by server configuration .htaccess

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

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

on cpanel terminal and I receive the following error:

[authz_core:error] [pid 10250]

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>

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.

Upvotes: 1

Views: 27966

Answers (1)

user1805543
user1805543

Reputation:

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>

Client denied by server configuration

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

Before you start

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/

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>

Or this one

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

For more explanition:

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

Upvotes: 5

Related Questions