Quantcast
Channel: Recent posts across whole site
Viewing all articles
Browse latest Browse all 49221

How to secure files folder

$
0
0

hello, i want to prevent people from execute php files in the files folder of drupal here my idea but its not working after restarting nginx can you correct my code please.

location ~ ^/sites/default/files/.(php)$ {
               deny all;
}

location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
          fastcgi_pass   127.0.0.1:9000; # By all means use a different server for the fcgi processes if you ne$
          fastcgi_index  index.php;
          fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;   # !! <--- Another path r$
#          fastcgi_intercept_errors on;

          include        /etc/nginx/fastcgi.conf;
#          track_uploads uploads 60s;
        }

Viewing all articles
Browse latest Browse all 49221

Trending Articles