I'm trying to set up a cron job to run this command every day:
wget -q -O - https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
The website example.com is located on the same server I'm running the cron job from. But I keep getting an error 403 in my logs:
"GET /wp-cron.php?doing_wp_cron HTTP/1.1" 403 428 "-" "Wget/1.17.1 (linux-gnu)"
When I try to access the same url from my browser it works though:
"GET /wp-cron.php?doing_wp_cron HTTP/1.1" 200 304 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
So I guess there is something blocking requests from my own server in my apache2.conf (or .htaccess file), but I have no idea what to look for. Any idea what line could be responsible of this?