diff --git a/nginx.conf.sample b/nginx.conf.sample index d05c676..bb8748a 100644 --- a/nginx.conf.sample +++ b/nginx.conf.sample @@ -30,8 +30,12 @@ server { # Index index index.php; + # Disable PHP where files can be uploaded + location ~ ^/(avatar|background|file)/.+\.php$ { + } + # PHP - location ~ \.php { + location ~ ^/.+\.php$ { fastcgi_pass unix:/run/php-fpm/php-fpm.sock; # Remove the "fastcgi_pass" line above and uncomment # the one below to use TCP sockets instead of Unix sockets