Skip to content

Instantly share code, notes, and snippets.

@theraw
Last active November 30, 2022 09:24
Show Gist options
  • Save theraw/17ff58a95adbd89ad51ad9acba9739bd to your computer and use it in GitHub Desktop.
Save theraw/17ff58a95adbd89ad51ad9acba9739bd to your computer and use it in GitHub Desktop.
location ~ \.php {
try_files $uri $uri /index.php =404;
fastcgi_pass 127.0.0.1:9081;
fastcgi_buffers 16 256k;
fastcgi_buffer_size 256k;
fastcgi_index index.php;
fastcgi_read_timeout 30;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
[php81]
user = nginx
group = nginx
listen = 127.0.0.1:9081
listen.owner = nginx
listen.group = nginx
pm = ondemand
pm.max_children = 5000
pm.process_idle_timeout = 15s;
pm.max_requests = 256
slowlog = /var/log/php/8.1/slow.log
request_slowlog_timeout = 8s
request_terminate_timeout = 15s
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
php_admin_value[error_log] = /var/log/php/8.1/www.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 1024M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment