Skip to content

Instantly share code, notes, and snippets.

@tippexs
Created September 23, 2019 22:57
Show Gist options
  • Save tippexs/bfe36cf32c3be4f594e4f706426a7892 to your computer and use it in GitHub Desktop.
Save tippexs/bfe36cf32c3be4f594e4f706426a7892 to your computer and use it in GitHub Desktop.
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=fcgicache:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
server {
listen 443 ssl http2;
server_name www.lev-fos-bayern.de;
******
gzip on;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
location ~ [^/]\.php(/|$) {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_intercept_errors off;
fastcgi_ignore_headers Cache-Control;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_cache fcgicache;
fastcgi_cache_valid 200 120m;
fastcgi_cache_methods GET HEAD;
add_header X-Fastcgi-Cache $upstream_cache_status;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment