• Hi,
    after the last update the nginx settings are broken and not working anymore.
    I use Nginx Proxy with Apache on Plesk with the following rules:

    # WebP Express rules
    # ——————–
    location ~* ^/wp-content/.*\.(png|jpe?g)$ {
    add_header Vary Accept;
    expires 365d;
    }
    location ~* ^/wp-content/.*\.webp$ {
    expires 365d;
    if ($whattodo = AB) {
    add_header Vary Accept;
    }
    }
    if ($http_accept ~* “webp”){
    set $whattodo A;
    }
    if (-f $request_filename.webp) {
    set $whattodo “${whattodo}B”;
    }
    if ($whattodo = AB) {
    rewrite ^(.*) $1.webp last;
    }
    if ($whattodo = A) {
    rewrite ^/wp-content/.*\.(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content break;
    }
    # ——————- (WebP Express rules ends here)

    What’s different now?
    Thank you in advance and greetings from Austria
    Lukas

    (and of corse thank’s for the awesome plugin!)

Viewing 1 replies (of 1 total)
  • Plugin Author rosell.dk

    (@roselldk)

    Hi Lukas,

    Unfortunately I introduced some code for protecting the converter scripts from being requested directly, which did not work on all NGINX systems.

    I have fixed it in 0.12.2
    Are you on that very newly published version?

Viewing 1 replies (of 1 total)
  • The topic ‘Webp on Nginx not working anymore’ is closed to new replies.