Skip to content

Instantly share code, notes, and snippets.

@nguyentuandat
Last active July 8, 2020 18:34
Show Gist options
  • Save nguyentuandat/a662661884aed506dcd8870e161da1ba to your computer and use it in GitHub Desktop.
Save nguyentuandat/a662661884aed506dcd8870e161da1ba to your computer and use it in GitHub Desktop.

Revisions

  1. nguyentuandat revised this gist Jul 8, 2020. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions thich.dev.conf
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,18 @@ server {
    try_files $uri $uri/ /index.php?$args;
    }

    fastcgi_ignore_headers Cache-Control Expires Set-Cookie;

    location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

    # fastcgi cache
    fastcgi_cache phpcache;
    fastcgi_cache_valid 200 301 302 10m;
    fastcgi_cache_use_stale error timeout updating invalid_header http_500 http_503;
    fastcgi_cache_min_uses 1;
    fastcgi_cache_lock on;
    add_header X-FastCGI-Cache $upstream_cache_status;
    }
    }
  2. nguyentuandat created this gist Jul 8, 2020.
    12 changes: 12 additions & 0 deletions thich.dev.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    server {
    server_name thich.dev;

    location / {
    try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    }
    }