Guest User

Untitled

a guest
Jan 17th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. location ~ /\.git {
  2. deny all;
  3. }
  4.  
  5. location ~ /\.ht {
  6. deny all;
  7. }
  8.  
  9. location ~ \.(gif|jpeg|jpg|png)$ {
  10. access_log off;
  11. expires 30d;
  12. }
  13.  
  14. location ~ \.(css|ico|js|xml)$ {
  15. access_log off;
  16. expires 30d;
  17. }
  18.  
  19. location ~* ^/(.*)/(.*) {
  20. if (-f $document_root/$1/.htpasswd) {
  21. error_page 599 = @auth;
  22. return 599;
  23. }
  24. }
  25.  
  26. location @auth {
  27. auth_basic "Password Protected";
  28. auth_basic_user_file $document_root/$1/.htpasswd;
  29. }
  30.  
  31. location ~* \.php$ {
  32. fastcgi_pass unix:/dev/shm/php-fastcgi.socket;
  33. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  34. include fastcgi_params;
  35. try_files $uri =404;
  36. }
Add Comment
Please, Sign In to add comment