Post by nudatech » Tue Mar 19, 2013 9:50 pm

I've recently installed OpenCart 1.5.5.1 on my server and I found out the checkout is triggering mod_evasive DOS prevention which is raising a 403 Forbidden error (client denied by server configuration) during the checkout (usually when processing the 2nd step).

I've tried changing the values for DOSPageCount and DOSSiteCount in mod-evasive.conf, but that didn't help, the only way to get rid of the error(s) during the checkout is disabling mod_evasive.

Installing FireBug I found out the 403 error is returned by the following request:
GET /test-shop/index.php?route=checkout/checkout/country&country_id=105 HTTP/1.1

Any suggestion?

Davide Coppola - Nudatech


User avatar
Newbie

Posts

Joined
Tue Mar 19, 2013 9:24 pm
Location - London, UK

Post by nudatech » Wed Mar 20, 2013 1:47 am

Spending more time on it I found out the problem was with mod_evasive.conf file which was not processed properly, now everything seems to work fine.

Just in case something similar happens to other people here a working mod_evasive.conf:

Code: Select all

<IfModule mod_evasive20.c>
    #optional directive (default value equals to 1024)
    DOSHashTableSize    2048
    
    #obligatory directives (if even one of them is not set, malfunctioning is possible)
    DOSPageCount        50
    DOSSiteCount        500
    DOSPageInterval     1
    DOSSiteInterval     1
    DOSBlockingPeriod   1

    # white list
    #DOSWhiteList           127.0.0.1
</IfModule>
Lowering DOSPageCount and DOSSiteCount values shouldn't be a big deal.

I'm still wondering if OpenCart could request less connections during the checkout though.

Davide Coppola - Nudatech


User avatar
Newbie

Posts

Joined
Tue Mar 19, 2013 9:24 pm
Location - London, UK

Post by butte » Mon Mar 25, 2013 3:57 am

Since the forum eliminates in posts and codeboxes a blank terminal line (final carriage return), it may be worth noting that Apache files ordinarily end in one, so if you select the code and paste it into place just add a final carriage return. Scripts of various sorts may or may not be upset by such a line (some will abort with it, some will abort without it).

The server should be configurable as to total connections. You can search for how to limit total connections (web if not OC) and if need be ask the server's support.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: No registered users and 9 guests