Skip to content

Instantly share code, notes, and snippets.

@Alexnder
Last active September 10, 2015 07:50
Show Gist options
  • Save Alexnder/8892b83d1a84f8bb7e07 to your computer and use it in GitHub Desktop.
Save Alexnder/8892b83d1a84f8bb7e07 to your computer and use it in GitHub Desktop.

Tips for ngix config

nano /etc/nginx/nginx.conf

worker_processes 1;    # Number of cores
server_tokens off;     # Disable show version

Best performance

nano /etc/php5/fpm/pool.d/www.conf

pm = static
pm.max_children = 10    # Max num of processes (Virtual Memory / Memory of One Process)

Set session lifetime to 3 day

nano /etc/php5/fpm/php.ini

session.gc_maxlifetime = 259200

Set PATH variable

nano /etc/php5/fpm/pool.d/www.conf

env[PATH] = /usr/local/bin:/usr/bin:/bin

Исправляем уязвимость http://habrahabr.ru/post/100961/

nano /etc/php5/fpm/php.ini

cgi.fix_pathinfo=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment