Hello, I am a bit confused of setting the document root. In all tutorials I have seen you shall create a directory in /var/www/ owned by a regular user, e.g. "/var/www/drupal" where "drupal" is owned for example by user "fred". I have instead set the root directory to /home/fred/www/drupal/web". Is this bad? It works perfectly. Fredby toft6633 - How to...
I got it to work. When I in the same directory placed "example.png" and "example.png.webp", the latter was served. I also placed this code in Service section: location ~* ^/.+\.(png|gif|jpe?g)$ { expires 1y; add_header Cache-Control "private,must-revalidate"; add_header Vary Accept; try_files $uri$webp_suffix $uri =404; } In ../conf.d/webpby toft6633 - How to...
Hello, I have just moved från Apache to Nginx. I cannot set an expiration date for webp images. I use Drupal. I have uploaded png images to Drupal. Drupal converts them to webp and the files get the extension "png.webp". This is my code in the service section. location ~* \.(js|css|png|jpg|jpeg|gif|ico|webp|svg)$ { try_files $uri /index.php?$query_string; expires 1y;by toft6633 - How to...