Advertisement
VictorMisa

nginx

May 8th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. if (!-e $request_filename)
  2. {
  3. rewrite ^(.+)$ /index.php?q=$1 last;
  4. }
  5. location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
  6. expires 365d;
  7. }
  8. location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  9. expires 2d;
  10. add_header Cache-Control "public, no-transform";
  11.  
  12. }
  13.  
  14. location ~* /wp-content/uploads/*/(.+\.doc)$ {
  15. add_header Content-disposition "attachment; filename=$1";
  16. }
  17.  
  18. gzip on;
  19. gzip_disable "MSIE [1-6]\\.(?!.*SV1)";
  20. gzip_proxied any;
  21. gzip_comp_level 9;
  22. gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
  23. gzip_vary on;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement