Guest User

Untitled

a guest
Aug 3rd, 2016
114
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2. listen 80 ;
  3. server_name _;
  4. location / {
  5. index index.html index.htm index.php;
  6. autoindex off;
  7. }
  8.  
  9. location /files {
  10. root /tunefiles;
  11. secure_link $arg_md5,$arg_expires;
  12. secure_link_md5 "$secure_link_expires$uri secret";
  13.  
  14. if ($secure_link = "") {
  15. return 403; # invalid hash or direct link
  16. }
  17. if ($secure_link = "0") {
  18. return 410; # link expired
  19. }
  20.  
  21. }
  22.  
  23.  
  24. # pass the PHP scripts to FastCGI server listening on unix:/var/run/www.socket
  25. location ~ \.php$ {
  26. root /tunefiles;
  27. fastcgi_pass unix:/var/run/www.socket;
  28. fastcgi_index index.php;
  29. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30. include fastcgi_params;
  31. fastcgi_read_timeout 10000;
  32. }
  33.  
  34. location ~ /\.ht {
  35. deny all;
  36. }
  37. }
RAW Paste Data