Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set $skip_cache 0;
- location ~* /wp-admin {
- fastcgi_cache_bypass $skip_cache;
- fastcgi_no_cache $skip_cache;
- fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- expires off;
- add_header URI $uri;
- include fastcgi.conf;
- }
- location / {
- gzip_static on;
- location ~.*\.(gif|jpg|png|ico|mp3|doc|ppt|tar|wav|swf|flv|txt|js|css|gz|tgz|pdf|jpeg)$ {
- expires max;
- log_not_found off;
- access_log off;
- }
- location ~.*\.(htm|html)$ {
- expires 1d;
- }
- location ~.*\.(ttf|otf|woff|woff2|svg|eot)$ {
- expires max;
- log_not_found off;
- # For webfonts
- add_header Access-Control-Allow-Origin *;
- }
- default_type application/x-httpd-php;
- try_files $uri $uri/ /cms/index.php?$args; # =404;
- }
- location ~ "\.php" {
- try_files $uri $uri/ =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_cache_bypass $skip_cache;
- fastcgi_no_cache $skip_cache;
- fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- include fastcgi.conf;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement