• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Issue WebP and nginx in reverse proxy

LorisMod

New Pleskian
Hello,

PHP run FPM by Apache, Nginx in Proxy mode

Screenshot_19.jpg

Screenshot_18.jpg

I tried to configure it like this, in etc/nginx/ nginx.conf i added in http:
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}

In Additional nginx directives
location ~* ^.+\.(png|jpe?g)$ {
add_header Vary Accept;
try_files $uri$webp_suffix $uri =404;
}

But PNG and JPG images with URL not rewritten by Apache, are not served as webp

Original image: https://beta.demomodule.com/img/cms/cms-img.jpg
WebP Image: https://beta.demomodule.com/img/cms/cms-img.webp

webp-not.jpg
In the mime.types file webp is present.

Test Web Site: TEST DEMO
 

Attachments

  • htaaccess.zip
    1.7 KB · Views: 2
Back
Top