Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80 ;
- server_name _;
- location / {
- index index.html index.htm index.php;
- autoindex off;
- }
- location /files {
- root /tunefiles;
- secure_link $arg_md5,$arg_expires;
- secure_link_md5 "$secure_link_expires$uri secret";
- if ($secure_link = "") {
- return 403; # invalid hash or direct link
- }
- if ($secure_link = "0") {
- return 410; # link expired
- }
- }
- # pass the PHP scripts to FastCGI server listening on unix:/var/run/www.socket
- location ~ \.php$ {
- root /tunefiles;
- fastcgi_pass unix:/var/run/www.socket;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_read_timeout 10000;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Add Comment
Please, Sign In to add comment