Magento – Cron.php returns 403 forbidden

Apache2cronemailerrorhttp-status-403

We've noticed emails from e.g. contact forms were not being send even though the site said they were.
We've added the cronjob to the system, but when we tried to test it by executing cron.php, we got a 403 FORBIDDEN.

url: https://merchgeex.com/cron.php

How can we fix this?

/var/log/apache2/error.log –>

[Thu Oct 06 07:20:03.760087 2016] [access_compat:error] [pid 7969] [client *ip*] AH01797: client denied by server configuration: /var/www/cron.php

Best Answer

correct way to test cron is to execute inside your server, in console:

/var/www/cron.sh

make sure this file is executable:

chmod u+x /var/www/cron.sh

and check cron log and output.
you have .htaccess file that blocks cron.php execution from web.

email issues also must be logged into /var/www/var/log/ or mail log in system /var/log/

Related Topic