Title: Nginx Cron Directive causing Loopback Error
Last modified: September 10, 2023

---

# Nginx Cron Directive causing Loopback Error

 *  [wykananda](https://wordpress.org/support/users/wykananda/)
 * (@wykananda)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/nginx-cron-directive-causing-loopback-error/)
 * We’re using Plesk Obsidian with Nginx with WordPress 6.2. We’re getting a 405
   loopback error in the WordPress “Site Health” check-up when this line is enabled
   in the “Addition Nginx directives” box of the “Apache & Nginx Settings” (please
   see the attached image below):
 * `location /wp-cron.php { add_header Cache-Control "no-cache, no-store, must-revalidate,
   max-age=0"; expires -1; }`
 * When the line is (#) commented out, no loopback error is reported.
 * Please advise.
 * ![](https://drive.google.com/file/d/13dC0cey8kLScwv5Re7h064Z-9EaV8nNw/view?usp
   =share_link)
 * [https://drive.google.com/file/d/13dC0cey8kLScwv5Re7h064Z-9EaV8nNw/view?usp=share_link](https://drive.google.com/file/d/13dC0cey8kLScwv5Re7h064Z-9EaV8nNw/view?usp=share_link)
    -  This topic was modified 3 years, 1 month ago by [wykananda](https://wordpress.org/support/users/wykananda/).
    -  This topic was modified 3 years, 1 month ago by [wykananda](https://wordpress.org/support/users/wykananda/).
    -  This topic was modified 3 years, 1 month ago by [wykananda](https://wordpress.org/support/users/wykananda/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [wykananda](https://wordpress.org/support/users/wykananda/)
 * (@wykananda)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/nginx-cron-directive-causing-loopback-error/#post-16617251)
 * Please note that this error is only occurring with:
 * FPM application served by Apache.
   Proxy Mode enabled.
 * If I bypass Apache by disabling Proxy Mode and using “Dedicated FPM application
   served by nginx”, I don’t see the error.
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/nginx-cron-directive-causing-loopback-error/#post-16620104)
 * Hi [@wykananda](https://wordpress.org/support/users/wykananda/),
   I understand
   your problem, but setting `"no-cache, no-store, must-revalidate, max-age=0` cache
   control header value for `wp-cron.php` requests are needed to ensure that those
   requests are never cached by Cloudflare CDN edge.
 * If the server level rule is causing issue, then I would suggest implementing 
   the rule using Cloudflare Transform Rules. There you can go in the option of 
   modify Response Header and then create a rule saying ->
 * if hostname equals to `example.com` (whatever your website domain is) and URI
   Path starts with `/wp-cron.php` then add the `cache-control` header with the 
   value `no-cache, no-store, must-revalidate, max-age=0`.
 * In this way the entire header manipulation will happen on edge and you don’t 
   need to have a server level rule for that.
 *  Thread Starter [wykananda](https://wordpress.org/support/users/wykananda/)
 * (@wykananda)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/nginx-cron-directive-causing-loopback-error/#post-16623533)
 * Hi [@isaumya](https://wordpress.org/support/users/isaumya/),
 * Thanks for your help. Setting up a Transform Rule indeed did fix the loopback
   error. However, it seemed like perhaps the issue was deeper. I was seeing _intermittent
   _504 errors being reported when updating wordpress pages in the editor. The update
   would timeout after 45 seconds or simply just take an awful long time to complete.
   I was going crazy trying to track down the cause.
 * When checking the PHP-FMP log, there was an error:
 * `PHP Fatal error:  Uncaught Error: Call to undefined function opcache_get_status()
   in /var/www/vhosts/katog.org/stage.sub/wp-content/plugins/wp-cloudflare-page-
   cache/libs/cache_controller.class.php:3157"`
 * I did a search in your forum and found this reference:
   [https://wordpress.org/support/topic/swcfpc_cache_purge_cron-error/](https://wordpress.org/support/topic/swcfpc_cache_purge_cron-error/)
   suggesting to turn off “Automatically purge the OPcache when Cloudflare cache
   is purged”.
 * Turning that option off made the PHP-FPM error go away. And it seemed to correct
   both the intermittent 504 error (yipee!) and the Loopback error too.
 * However, I do have OPCache enabled on the Plesk server. So, **would you know 
   what would be causing “`opcache_get_status()`” error and how to correct it so
   the OPCache purge works?** I’m assuming I would want “Automatically purge the
   OPcache when Cloudflare cache is purged” enabled and working if it’s in use on
   the server.
 * Thanks for your help! A great plugin 🙂
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/nginx-cron-directive-causing-loopback-error/#post-16624830)
 * Hi,
   The `opcache_get_status` is a PHP Function: [https://www.php.net/manual/en/function.opcache-get-status.php](https://www.php.net/manual/en/function.opcache-get-status.php)–
   not sure why it is not available in Plesk. If it is not available in your system,
   you can disable that option inside the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Nginx Cron Directive causing Loopback Error’ is closed to new replies.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/reviews/)

## Tags

 * [cron](https://wordpress.org/support/topic-tag/cron/)
 * [loopback](https://wordpress.org/support/topic-tag/loopback/)
 * [nginx](https://wordpress.org/support/topic-tag/nginx/)
 * [Plesk](https://wordpress.org/support/topic-tag/plesk/)

 * 4 replies
 * 3 participants
 * Last reply from: [iSaumya](https://wordpress.org/support/users/isaumya/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/nginx-cron-directive-causing-loopback-error/#post-16624830)
 * Status: not resolved