• Resolved Ariakan

    (@ariakan)


    Hi!

    I changed my server today and now cwebp works and create images, finaly!
    But I have a new issue: it doesn’t put the webp files in the frontend.

    In the settings, I have this message: “Your site appears to be missing mod_headers”

    I contacted the web hoster, Cloudways, and he told me that it was enable by default, and he verified if all was ok. And all was ok.

    The .htaccess is fine, the plugin modified it:

    # BEGIN EWWWIO
    # The directives (lines) between "BEGIN EWWWIO" and "END EWWWIO" are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png|gif)$
    RewriteCond %{REQUEST_FILENAME}.webp -f
    RewriteCond %{QUERY_STRING} !type=original
    RewriteRule (.+)\.(jpe?g|png|gif)$ %{REQUEST_URI}.webp [T=image/webp,L]
    </IfModule>
    <IfModule mod_headers.c>
    <FilesMatch "\.(jpe?g|png|gif)$">
    Header append Vary Accept
    </FilesMatch>
    </IfModule>
    AddType image/webp .webp
    # END EWWWIO

    I tried on a brand new WordPress, installed by Cloudways, with no cache plugin, there is the same problem.
    When I use the JS method, it works.

    What can I do to help you find why your plugin doesn’t see mod_headers ?

    Thank you for your help! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    You may need to ask Cloudways to exclude images from the Nginx vhost. Otherwise, images could be cached by Nginx and then the .htaccess rules don’t work properly (because they are for Apache, which sits “behind” Nginx).
    Don’t worry about the mod_headers though. If they confirm the module, that’s good enough. Since Cloudways runs php-fpm, EWWW IO cannot reliably detect which modules are loaded.

    Thread Starter Ariakan

    (@ariakan)

    Hi!

    That was exactly that.
    I asked support if they could edit the Nginx config, he said no. Then I sent him this page, and he said he could do something for Webp files. (apparently they prevent webp but by another way).

    Now it works, i still have the message, but webp files are loaded with the .htaccess, thank you!

    • This reply was modified 4 years ago by Ariakan.
    Plugin Author nosilver4u

    (@nosilver4u)

    I have a testing account with them, so I’ll follow up with them so we can make sure our docs on the Cloudways config are up to date. Glad to hear it’s all working nicely!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Your site appears to be missing mod_headers”’ is closed to new replies.