Advertisement
Guest User

etc__nginx__common.conf

a guest
Feb 6th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.55 KB | None | 0 0
  1.         set $skip_cache 0;
  2.  
  3.      location ~* /wp-admin {
  4.  
  5.         fastcgi_cache_bypass                $skip_cache;
  6.         fastcgi_no_cache                    $skip_cache;
  7.    
  8.         fastcgi_pass  unix:/var/run/php-fpm/php-fpm.sock;
  9.         fastcgi_index index.php;
  10.    
  11.         expires off;
  12.      
  13.         add_header URI $uri;
  14.         include fastcgi.conf;
  15.     }
  16.    
  17.  
  18.         location / {
  19.  
  20.               gzip_static on;
  21.  
  22.               location ~.*\.(gif|jpg|png|ico|mp3|doc|ppt|tar|wav|swf|flv|txt|js|css|gz|tgz|pdf|jpeg)$ {
  23.                       expires         max;
  24.                       log_not_found   off;
  25.                   access_log      off;  
  26.               }
  27.    
  28.               location ~.*\.(htm|html)$ {
  29.                       expires         1d;
  30.                 }
  31.  
  32.               location ~.*\.(ttf|otf|woff|woff2|svg|eot)$ {
  33.                       expires         max;
  34.                   log_not_found   off;
  35.                  
  36.                   # For webfonts
  37.                   add_header      Access-Control-Allow-Origin *;
  38.                }
  39.  
  40.  
  41.               default_type  application/x-httpd-php;
  42.               try_files     $uri $uri/    /cms/index.php?$args;  # =404;
  43.         }
  44.  
  45.         location ~ "\.php" {
  46.  
  47.               try_files $uri $uri/ =404;
  48.               fastcgi_split_path_info ^(.+\.php)(/.+)$;
  49.  
  50.               fastcgi_cache_bypass                $skip_cache;
  51.               fastcgi_no_cache                    $skip_cache;
  52.  
  53.               fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  54.               fastcgi_index index.php;
  55.               include fastcgi.conf;
  56.  
  57.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement