cron job blocked by Mod Security

Category: Databases

SergeyGorbachov
Asked:
2013-11-05 11:03 am EST

Hits: 561
I wont run my script test2.php from cite booksonline.com.ua.
And get message:
<html><head><title>Error 406 - Not Acceptable</title><head><body><h1>Error 406 - Not Acceptable</h1><p>Generally a 406 error is caused because a request has been blocked by Mod Security. If you believe that your request has been blocked by mistake please contact the web site owner.</p></body></html>

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JeffMa
Staff
7,372 Points
2013-11-05 11:47 am EST
While we would be unable to provide you with the exact rule that is blocking it via this public forum, I can help you resolve it. This can be resolved by simply turning off mod_security on your domain. The following article will assist you in doing so:
Disable mod_security via cPanel Modsec Manager

You must login before you can post a comment about this answer.

I turn off in Modsec Manager my sites. But I again have same error.
My command in cron job is : curl http://www.booksonline.com.ua/test2.php
SergeyGorbachov
73 Points
2013-11-05 12:24 pm EST
Hello SergeyGorbachov,

When you're running a cron job with the curl command, you'll want to be sure to specify a User-Agent string along with your URL to avoid any problems.

This is covered in our guide on running a cron job with curl. Basically your cron job command would need to look something like:

/usr/bin/curl --user-agent cPanel-Cron http://example.com/cron.php


Please let us know if you still encounter any issues at all.

- Jacob
JacobIMH
9,521 Points
Staff
2013-11-05 12:59 pm EST
Like this Question?

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 200933

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!