Last active
May 25, 2024 17:02
-
-
Save uhop/9177153 to your computer and use it in GitHub Desktop.
Revisions
-
uhop revised this gist
Feb 24, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,6 +43,7 @@ http { location ~* ^/images/.+\.(png|jpg)$ { root /home/www-data; add_header Vary Accept; try_files $uri$webp_suffix $uri =404; } } -
uhop revised this gist
Feb 23, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,8 +42,8 @@ http { server_name localhost; location ~* ^/images/.+\.(png|jpg)$ { root /home/www-data; try_files $uri$webp_suffix $uri =404; } } } -
uhop revised this gist
Feb 23, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,8 @@ http { tcp_nopush on; tcp_nodelay on; # IMPORTANT!!! Make sure that mime.types below lists WebP like that: # image/webp webp; include /etc/nginx/mime.types; default_type application/octet-stream; -
uhop created this gist
Feb 23, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ user www-data; http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; include /etc/nginx/mime.types; default_type application/octet-stream; gzip on; gzip_disable "msie6"; ## # Conditional variables ## map $http_accept $webp_suffix { default ""; "~*webp" ".webp"; } ## # Minimal server ## server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html; # Make site accessible from http://localhost/ or whatever you like server_name localhost; location ~* ^/images/.+\.(png|jpg)$ { root /home/www-data; try_files $uri$webp_suffix $uri =404; } } }