I’m implementing multiple upload for 25 files at once using Dropzone and Laravel.
On my development server, the code runs well. 25 files, all successful.
However, on my production server, 5 files are ok. More than 5 files, there will be few returned with 403 Forbidden error.
I already configured php.ini
upload_max_filesize = 50MB
post_max_size = 50MB
and the tested files didn’t reach 5MB actually.
There is no LimitRequestBody setting in httpd.conf.
The form is included with @csrf.
Where else should I look into?
After couple of days, I came across this line in apache modsec_audit.log
Apache-Error: [file "mod_evasive24.c"] [line 248] [level 3] client denied by server configuration: /var/www/myapp/public/api
That points directly to the error.
Now I need advice on how to configure mod_evasive to handle dropzone multiple upload.
2
Answers
I found the solution. I configure mod_evasive like this
I increase DOSPageCount from 2 to 25 because I have max of 25 files for the upload.
You can do two options in this
Option 1
Modify the mod_evasive configuration in your apache.
DOSPageCount
: This is the number of requests for the same page.DOSSiteCount
: Requests for any object by the same client on the same listener per site interval.Option 2
Add
parallelUploads
option to theDropzone