403 forbidden by Apache

Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Thu, 2005-03-17 13:03

I has some problems with my new Gallery2. May hosting companies have some restrictions how many PHP files can be requested from server. G2 use image firewall that asks for pictures through PHP scripts. When thumbnails then are drawn on a page a few may be missing. And continue clicking gives 403 forbidden by Apache.

What configurations on Apache may cause this?

Soon around 6000 photos ... sorry it's in swedish. http://foton.kimslotte.net/
----

Gallery URL (optional): http://foton.kimslotte.net/
Gallery version: CVS version, 16 March
Webserver (with version): Apache/1.3.33 (Unix)
Datatabase (with version): MySQL
PHP version (eg 4.2.1): PHP/4.3.10
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:
G1 version (for migration bugs):

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Thu, 2005-03-17 15:47

I think a phpinfo file is necessary to solve this problem:
http://foton.kimslotte.net/phpinfo.php

I did put the same questions to my hosting company ... they have not yet come up with a solution to the problem.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Thu, 2005-03-17 21:18

Strange, this looks like a local problem. I could not reproduce it on my other computer.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-03-18 08:01

Weird .. that's got to be something that your host is doing. Maybe mod_throttle?

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Sun, 2005-03-20 20:08

I myself think my host have set their firewall settings a little to tight to prevent DOS attacks.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Fri, 2005-04-01 14:36
bharat wrote:
Weird .. that's got to be something that your host is doing. Maybe mod_throttle?

My hosting company didn't have easy to find out what's the problem ... but they ar now the right track. The thing that is cuasing this is mod_security.

 
sdenike

Joined: 2004-03-24
Posts: 13
Posted: Fri, 2005-05-27 15:30

I belive that mod_dosevasive is the problem with your account, I am having the same issue.

 
sdenike

Joined: 2004-03-24
Posts: 13
Posted: Fri, 2005-05-27 16:10

Well I fixed the problem, if you have mod_dosevasive running on your server (most shared hosting accounts do) then you need to have this added to your site in the VirtualHost section of the apache config. With the settings I have here everything seems to work well and I have included my setup as well.

FIX::

Quote:
# Mod for Gallery2 so as it doesn't error out
<IfModule mod_dosevasive.c>
DOSHashTableSize 3097
DOSPageCount 5
DOSSiteCount 100
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 2
</IfModule>

SETUP::
Gallery version = 2.0-beta-3 core 0.9.17
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a
Database = mysqlt 4.0.23-standard
Toolkits = ArchiveUpload, Exif, Gd, ImageMagick, NetPBM, Thumbnail, SquareThumb
Operating system = Linux srs001.sourcedns.com 2.4.21-27.0.2.ELsmp #1 SMP Wed Jan 19 01:53:23 GMT 2005 i686
Browser = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050517 Firefox/1.0.4 (Debian package 1.0.4-2)

Also.... I am running Gallery2 Beta 2 intigrated with Wordpress 1.5.1.1, running album views with 3x3 colums/rows. All this seems to work fine with mine. You may want to tweak the settings to your likings as the numbers are pretty high.

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Sun, 2005-07-24 15:17

Thank you for the info ... I will try to "wake up" my hosting company about the issue again.

 
deeyay

Joined: 2006-04-06
Posts: 2
Posted: Sat, 2006-04-08 14:26

I'm having the same issue with my hosting company. I have just contacted them and I'm eager to see if they are willing to fix this problem.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-08-15 02:10

I had a friend that has a similar issue except he was unable to get access to any file in the gallery2/lib direcotry. He received a 406 error code.

Quote:
An appropriate representation of the requested resource /gallery/lib/yui/yahoo-min.js could not be found on this server.

a fix was to create a .htaccess file with this as the contents:
SecFilterEngine Off

Just posting this because the FAQ points here as well as search results.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
andrabr

Joined: 2007-09-05
Posts: 18
Posted: Thu, 2007-09-06 21:22

Brilliant!

SecFilterEngine Off is also a solution for those who see no action in plugin installation screen (just green lines) - there is a 403 happening in the background.

Thanks, man!