Jump to content

Client denied by server configuration - error


Recommended Posts

Hi,

 

I have a problem with the popup window appering while adding new product/updating existing one.

 

While checking the apache logs I get:

 

 

[Thu Apr 04 00:11:43 2013] [error] [client 189.161.39.194] client denied by server configuration: /var/www/shops/88/store/adminShop/index.php, referer: http://ecom01088.com...03be3d31c5574e9

 

It looks like problem on the Apache side. In my vhost I have verified the configuration:

 

 

<VirtualHost *:80>

ServerName ecom01088.com

DocumentRoot /var/www/shops/88/store

 

ErrorLog /var/www/shops/88/logs/error.log

 

<Directory /var/www/shops/88/store>

Options Indexes Includes FollowSymLinks

AllowOverride None

Allow from all

Order allow,deny

</Directory>

 

<Directory /var/www/shops/88/store/adminShop>

Options Indexes Includes FollowSymLinks

AllowOverride None

Allow from all

Order allow,deny

</Directory>

 

 

 

# Possible values include: debug, info, notice, warn, error, crit,

# alert, emerg.

LogLevel warn

 

CustomLog /var/www/shops/88/logs/access.log combined

</VirtualHost>

 

It looks like the 'Allow from all' should have fixed the problem, but it did not. I am stuck with the problem and the error popup window still appears on my Prestashop BO. I am using the version 1.5.3.1

 

Thanks for any help on this.

 

Regards,

Karol

  • Like 1
Link to comment
Share on other sites

Ok so I have already resolved this problem.

 

It was not a problem inside the vhost nor the apache.conf. The problem was with module mod_evasive.

So if anyone has same problem I recommend to disable mod_evasive or configure it correctly.

Link to comment
Share on other sites

  • 2 years later...

Hi I am having similar problem. My site has the following error message: - 

[sun Dec 06 18:43:01.338336 2015] [access_compat:error] [pid 13759:tid 140192916477696] [client 122.177.132.185:20934] AH01797: client denied by server configuration: uri /img/cms/720x202xLechuza_TopBanner2015.jpg.pagespeed.ic.tKZefw4P8C.webp, referer:

 

How did you find out which module is giving an error.

Link to comment
Share on other sites

  • 7 months later...
  • 8 months later...

@vanitec, @veganline: please read the error logs of your server. Client denied is a vide problem, which can come from some script or server configuration with restrictions. The error log exact on the time the error appears should show you more detailed information for to debug.

Link to comment
Share on other sites

[Mon Apr 10 14:53:59.996982 2017] [access_compat:error] [pid 345129:tid 140383690356480] [client 000.000.000.00:0000] AH01797: client denied by server configuration: /home/example/public_html/subdirectory/admin/error_log, referer: http://exampe.com/subdirectory/admin/backups/

[client 000.000.000.00:0000] is me

Same message for admin/filemanager/
Same message for admin/import/
Same message for admin/error_log

A series of similar problems began when my host updated its server, probably to a new Apache 4.4 version - that's the gist of what I pick-up from googling.

I see bulletin boards online suggesting I change .htaccess files for these directories, just like the first person in this thread of posts, and I have tried the same. After changing the .htaccess files I get the error message above and an error 500 on my screen when I try to log-on.

Any thoughts welcome - maybe I need to search how to copy my site data, re-install from scratch, and add the data? Or maybe there is a nifty fix for the current, non-functioning site?

Edited by veganline (see edit history)
Link to comment
Share on other sites

php-version in use is ?

Apache version 4.4. ? Are you sure ? This not yet available. We have 2.4.x. And this version is available since years (2012). You are running older version ?

 

The error you are having is coming from .htaccess. Did you added some foreign code to it ? The code added does not match which the language your apache can read.

  • Like 1
Link to comment
Share on other sites

PHP 5.5 on default settings - whoops!
Prestashop 1.6.1.11
Installatron applications installer and CPanel


Yes I have added some code, tried to revert to something fool-proof, and am not sure how.
I've tried working without any .htaccess file at all, and that doesn't work either.
I've tried checking the .htaccess file in on an automatic checking site, and tweaked it till OK
The site is set to work as en-gb rather than en-us which could have upset it.

I tried installing a fresh Prestashop on a free web host and transplanting the .htaccess file, but it was a longer one from Prestashop : 1.6.1.12, 1.7.1.0, 1.4.11.1     and didn't work

This is the nearest I can find to my .htaccess that worked....


# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on

#domain: example.com
RewriteRule . - [E=REWRITEBASE:/subdomain/]
RewriteRule ^api$ api/ [L]

RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
<IfModule mod_headers.c>
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">
        Header add Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /x/index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again


-----------------------
I tried adding

DefaultLanguage en-GB

just now and the error message changed, so I took it out again. The error message was

[Mon Apr 10 17:05:33.939381 2017] [access_compat:error] [pid 400549:tid 140383648392960] [client 000.000.000.00:3886] AH01797: client denied by server configuration: /home/example/public_html/subdirectory/admin/error_log, referer: http://example.com/subdomain/
-----------------------




 

Edited by veganline (see edit history)
Link to comment
Share on other sites

BTW your .htaccess is quite strange. There are some parts missing. You are using own theme ?

 

This is one original PS 1.6.1.11(12)

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on


#Domain: yourdomain.com
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]

RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
<IfModule mod_headers.c>
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
  • Like 1
Link to comment
Share on other sites

Thanks! Tomorrow I will come back to this and try to work-out more.
I have added your standard .htaccess file and in doing so found another error message file about this

#if (Configuration::get('PS_USE_HTMLPURIFIER')) {
    require_once(_PS_TOOL_DIR_.'htmlpurifier/HTMLPurifier.standalone.php');
}

usually writing about the last of the three lines, line 136:

[10-Apr-2017 16:02:10 UTC] PHP Parse error:  syntax error, unexpected '}' in /home/example/public_html/subdomain/config/config.inc.php on line 136

There is another error message that sometimes comes-up too.

[09-Apr-2017 16:35:38 UTC] PHP Fatal error:  Class 'Context' not found in /home/example/public_html/subdomain/footer.php on line 27

And another that came round a few days ago on the same theme

[09-Apr-2017 10:26:41 UTC] PHP Warning:  require_once(/home/example/public_html/subdomain/tools/htmlpurifier/HTMLPurifier.standalone.php): failed to open stream: No such file or directory in /home/veganlin/public_html/x/config/config.inc.php on line 135
[09-Apr-2017 10:26:41 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/example/public_html/subdomain/tools/htmlpurifier/HTMLPurifier.standalone.php' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/example/public_html/subdomain/config/config.inc.php on line 135

And another slightly different, and more rare

[09-Apr-2017 16:35:38 UTC] PHP Fatal error:  Class 'Context' not found in /home/example/public_html/subdomain/footer.php on line 27

Anyway, thanks for all your help so far!
John




 

Edited by veganline (see edit history)
Link to comment
Share on other sites

Hi
Thanks!

back-office -> advanced paramaters -> performance. Please deactivate it.

I can't make the program work to log-on at the moment; I just get a white screen or an error 500.

Meanwhile I tried putting hashtags left of all three lines quoted above - the ones marked 134 135 and 136, tried logging-on again, and still got an error 500 but the error log in the root directory changed.

[11-Apr-2017 10:48:28 Europe/London] PHP Warning:  require_once(/home/example/public_html/subdomain/tools/smarty/Smarty.class.php): failed to open stream: No such file or directory in /home/example/public_html/subdomain/config/smarty.config.inc.php on line 29
[11-Apr-2017 10:48:28 Europe/London] PHP Fatal error:  require_once(): Failed opening required '/home/example/public_html/subdomain/tools/smarty/Smarty.class.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/example/public_html/subdomain/config/smarty.config.inc.php on line 29

Apache errors:

[Tue Apr 11 10:48:40.341023 2017] [access_compat:error] [pid 792460:tid 140383723927296] [client 000.000.000.00:4262] AH01797: client denied by server configuration: /home/example/public_html/subdomain/admin/error_log, referer: http://example.com/subdomain/
[Tue Apr 11 10:48:20.497912 2017] [core:crit] [pid 794196:tid 140383816247040] (13)Permission denied: [client 000.000.000.00:4259] AH00529: /home/example/public_html/subdomain/log/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/example/public_html/subdomain/log/' is executable
[Tue Apr 11 10:48:20.497754 2017] [core:crit] [pid 794196:tid 140383816247040] (13)Permission denied: [client 000.000.000.00:4259] AH00529: /home/example/public_html/subdomain/mails/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/example/public_html/subdomain/mails/' is executable
[Tue Apr 11 10:48:20.496988 2017] [core:crit] [pid 794196:tid 140383816247040] (13)Permission denied: [client 000.000.000.00:4259] AH00529: /home/example/public_html/subdomain/translations/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/example/public_html/subdomain/translations/' is executable
[Tue Apr 11 10:48:20.496893 2017] [core:crit] [pid 794196:tid 140383816247040] (13)Permission denied: [client 000.000.000.00:4259] AH00529: /home/example/public_html/subdomain/themes/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/example/public_html/subdomain/themes/' is executable
[Tue Apr 11 10:48:20.489274 2017] [core:crit] [pid 794196:tid 140383816247040] (13)Permission denied: [client 000.000.000.00:4259] AH00529: /home/example/public_html/subdomain/img/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/example/public_html/subdomain/img/' is executable
[Tue Apr 11 10:48:20.489195 2017] [core:crit] [pid 794196:tid 140383816247040] (13)Permission denied: [client 000.000.000.00:4259] AH00529: /home/example/public_html/subdomain/config/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/example/public_html/subdomain/config/' is executable
[Tue Apr 11 10:48:20.489172 2017] [core:crit] [pid 794196:tid 140383816247040] (13)Permission denied: [client 000.000.000.00:4259] AH00529: /home/example/public_html/subdomain/install/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/example/public_html/subdomain/install/' is executable
[Tue Apr 11 10:48:20.489144 2017] [core:crit] [pid 794196:tid 140383816247040] (13)Permission denied: [client 000.000.000.00:4259] AH00529: /home/example/public_html//public_html/subdomain/classes/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/example/public_html/subdomain/classes/' is executable
[Tue Apr 11 10:48:20.489109 2017] [access_compat:error] [pid 794196:tid 140383816247040] [client 000.000.000.00:4259] AH01797: client denied by server configuration: /home/example/public_html/example/public_html/subdomain/error_log

Help appreciated, as ever
John
PHP 5.5 memory 128MB
Prestashop 1.6.1.11
Installatron applications installer and CPanel



 

Edited by veganline (see edit history)
Link to comment
Share on other sites

The error is saying that your .htccaess don't has enough rights to be readable. CHMOD 0644 (if not try with 0777 and check, but I don't recommend - 0644 is enough) should solve the problem. If this is set and error still available, so please contact your provider, cause the problems you are relating are due to a misconfigured, or not enough for to run Prestashop. BTW Prestashop 1.6. requires a memory _limit of at least 256 (better 512), and max_execution_time and max_input_time of both 300 for to don't terminate scripts premature and deliver a 500 error code.

 

Module mod_rewrite (server module) should be also installed and running.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...