-
Block Nginx from Serving .git Directories
location ~ /\.git { deny all; } # or, all . directories/files in general (including .htaccess, etc) location ~ /\. { deny all; }
-
Increase Max Number of Allowed Opened Files
This is “How To Increase Max Number of Allowed Opened Files Nginx and PHP-FPM on Ubuntu“. According to some tutorials you can changed the max number of opened files per user in /etc/security/limits.conf * soft nofile 64000 * hard nofile 68000 You also changed the max number of opened files for entire system in /etc/sysctl.conf fs.file-max = 200500 After reboot your machine, you should check soft and hard limits for your user login to the system with thuns@ubuntu:~$ ulimit -Sn 64000 thuns@ubuntu:~$ ulimit -Hn 68000 As you see, the limits applied to users. The problem is sometime that can’t change the limits for Nginx and PHP thuns@ubuntu:~$ sudo ps aux|grep…