Browse Source

+ webp example config

master
parent
commit
471b5c1502
  1. 34
      config/nginx/conf.d/vhosts.conf.example

34
config/nginx/conf.d/vhosts.conf.example

@ -11,8 +11,16 @@ map $http_host $root {
loc.wordpress /usr/share/nginx/html/someprojectwp;
}
# @see https://github.com/OFFLINE-GmbH/oc-responsive-images-plugin/#responsive-images
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}
server {
server_name loc.octobercms;
server_name
loc.octobercms
;
listen 80;
root $root;
#include global/auth.conf;
@ -27,6 +35,30 @@ server {
}
}
server {
server_name
loc.octobercmswebp
;
listen 80;
root $root;
include includes.d/octobercms.conf;
include includes.d/offline-webp.conf;
include includes.d/staticfiles.conf;
location = /index.php {
fastcgi_pass php74;
include fastcgi_params;
fastcgi_read_timeout 3000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location = /plugins/offline/responsiveimages/webp.php {
fastcgi_pass php74;
include fastcgi_params;
fastcgi_read_timeout 3000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
server {
server_name loc.wordpress;
listen 80;

Loading…
Cancel
Save