Advertisement
Guest User

Untitled

a guest
Mar 14th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen      80;
  3.     server_name ap-office.test www.ap-office.test *.ap-office.test;
  4.     root        /app/ap-office.test;
  5.     index       index.php index.html index.htm;
  6.    
  7.     access_log  /app/vagrant/nginx/log/ap-office.test.log;
  8.     error_log   /app/vagrant/nginx/log/ap-office.test.log;
  9.  
  10.     location / {
  11.         location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  12.             expires     max;
  13.         }
  14.  
  15.         location ~ \.php$ {
  16.             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  17.             if (!-f $document_root$fastcgi_script_name) {
  18.                 return  404;
  19.             }
  20.  
  21.             fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  22.             include         /etc/nginx/fastcgi_params;
  23.         }
  24.     }
  25.  
  26.     location ~* "/\.(htaccess|htpasswd)$" {
  27.         deny    all;
  28.         return  404;
  29.     }
  30.    
  31.     location ~ /\.(ht|svn|git) {
  32.        deny all;
  33.    }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement