LorisMod
New Pleskian
Hello,
PHP run FPM by Apache, Nginx in Proxy mode
I tried to configure it like this, in etc/nginx/ nginx.conf i added in http:
In Additional nginx directives
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
In the mime.types file webp is present.
Test Web Site: TEST DEMO
PHP run FPM by Apache, Nginx in Proxy mode
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
In the mime.types file webp is present.
Test Web Site: TEST DEMO