Support » Plugin: WebP Converter for Media » Nginx config correct, but getting “Redirects on your server are not working.”

  • Resolved nicoter

    (@nicoter)


    Hi,

    Thanks for the great plugin! It used to work on my previous Litespeed server, but after moving to Nginx it stopped working.

    I get the following error message on the plugin settings page:

    Redirects on your server are not working. Check the correct configuration for you in the plugin FAQ. If your configuration is correct, it means that your server does not support redirects from the .htaccess file or requests to images are processed by your server bypassing Apache. In this case, please contact your server administrator.

    I double checked the server configuration and it should be correct:

    /etc/nginx/mime.types contains image/webp webp; and /etc/nginx/sites-available/mysite.com contains:

        location ~ /wp-content/uploads/(?<path>.+)\.(?<ext>jpe?g|png|gif)$ {
          if ($http_accept !~* "image/webp") {
            break;
          }
          add_header Vary Accept;
          expires 365d;
          try_files /wp-content/uploads-webpc/$path.$ext.webp $uri =404;
        }
    

    Any idea?

    Thanks!

    PS: Not sure if it matters, but the Nginx config in the FAQ has location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif)$ while in the forum you posted location ~ /wp-content/uploads/(?<path>.+)\.(?<ext>jp?g|png|gif)$

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