Reverse-proxy Nginx + Apache .webp support

UncleBobby

New member
Joined
Oct 29, 2019
Messages
4
Hello there. I'm having a hard time trying to figure out how to serve .webp images for browsers that support it automatically when both webp and png/jpg files are available in the same directory.
I have seen bunch of .htaccess quick fixes (like this one https://images.guide/#how-do-i-serve-webp)but none of them works for me, and then i remembered that i'm running Reverse-proxy.

Does that mean that images are severed by nginx and the .htaccess i ignored??
Not sure if this is the right place to ask this followup question, but how can i achieve the same thing using nginx.conf?

The page in question:
https://digionline.no/webp/

Im running:
Centos 7.1908
Reverse-proxy Nginx + Apache
CB 2
PHP 7.2 and 5.6 (php-fpm)
 
The .htaccess file is processed by Apache sitting behind Nginx, if any redirection is to be happen it will be respected. Apache will find a redirect/rewrite in .htaccess and make nginx to load a needed file. If the things are not working as intended, then you either a have an error in rules or your setup is not completed.
 
Back
Top