Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# nginx conf
server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/XXXX/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/XXXX/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
root /var/www/XXXX;
index index.php;
server_name XXXX;
error_log /var/log/nginx/sound_error.log warn;
client_body_buffer_size 250M;
client_max_body_size 250M;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
# pool php-fpm
root@XXX:/etc/php/7.0/fpm/pool.d# cat www.conf | grep -v "^$" | grep -v "^;"
[www]
user = www-data
group = www-data
listen = /run/php/php7.0-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 16
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
request_terminate_timeout = 600
# perms on php sock
root@XXXX:/etc/php/7.0/fpm/pool.d# ls -la /run/php/
total 4
drwxr-xr-x 2 www-data www-data 80 May 6 18:43 .
drwxr-xr-x 32 root root 1100 Aug 10 12:06 ..
-rw-r--r-- 1 root root 4 May 6 18:43 php7.0-fpm.pid
srw-rw---- 1 www-data www-data 0 May 6 18:43 php7.0-fpm.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.