Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- location ~ /\.git {
- deny all;
- }
- location ~ /\.ht {
- deny all;
- }
- location ~ \.(gif|jpeg|jpg|png)$ {
- access_log off;
- expires 30d;
- }
- location ~ \.(css|ico|js|xml)$ {
- access_log off;
- expires 30d;
- }
- location ~* ^/(.*)/(.*) {
- if (-f $document_root/$1/.htpasswd) {
- error_page 599 = @auth;
- return 599;
- }
- }
- location @auth {
- auth_basic "Password Protected";
- auth_basic_user_file $document_root/$1/.htpasswd;
- }
- location ~* \.php$ {
- fastcgi_pass unix:/dev/shm/php-fastcgi.socket;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- try_files $uri =404;
- }
Add Comment
Please, Sign In to add comment