Support » Plugin: WebP Express » It seems you are visiting this file (plugins/webp-express/wod/webp-on-demand.php

  • Hi,

    I tried this plugin locally and all was well.

    I then tried it on a staging server and it wouldn’t work at all.

    The staging server in Nginx with an apache proxy, setup via Runcloud.

    I put in the nginx rules (I tried them all) and they kick in, but visiting an image URL just outputs the following:

    It seems you are visiting this file (plugins/webp-express/wod/webp-on-demand.php) directly. We do not allow this.

    What am I missing?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jake Whiteley

    (@twentyzerotwo)

    I can confirm the URL in the browser is correct and pointing to the image URL /wp-content/uploads/2020/12/Lewa-House-1-of-1-17-scaled-1600x1067.jpg.

    So something about my setup is setting $_SERVER['REQUEST_URI'] it would seem?

    Thread Starter Jake Whiteley

    (@twentyzerotwo)

    Because there is an apache proxy, $_SERVER["SERVER_SOFTWARE"] is set to "Apache/2.4.46 (Unix) OpenSSL/1.1.1".

    I mean, this is technically correct . The request is handled by nginx and then passed to apache as it ends up being a php file request instead of a static asset.

    I can bypass this by adding SetEnv WPENGINE_ACCOUNT true to my htaccess, but ideally there should be an admin setting – “This site uses an apache/nginx for PHP files” or similar.

    thoughts?

    I’ve just been going round and round in circles trying to get this to work. Thanks so much for writing down the solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.