diff options
Diffstat (limited to 'grav.uwsgi.ini')
-rw-r--r-- | grav.uwsgi.ini | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/grav.uwsgi.ini b/grav.uwsgi.ini new file mode 100644 index 000000000000..500a48aa2097 --- /dev/null +++ b/grav.uwsgi.ini @@ -0,0 +1,79 @@ +[uwsgi] +; load the required plugins +plugins = php +; force the sapi name to 'apache', this will enable the opcode cache +php-sapi-name = apache + +; set master process name and socket +; '%n' refers to the name of this configuration file without extension +procname-master = uwsgi %n +master = true + +; drop privileges +uid = grav +gid = grav +umask = 022 + +socket = /run/uwsgi/%n.sock +chown-socket = %(uid):http +chmod-socket = 660 +vacuum = true + +# uncomment for a stats socket, that can be used with uwsgitop +# stats = /run/uwsgi/%n-stats.sock + +; run with at least 1 process but increase up to 4 when needed +processes = 4 +cheaper = 1 +# idle = 600 +# die-on-idle = true + +; reload whenever this config file changes +; %p is the full path of the current config file +touch-reload = %p + +; disable uWSGI request logging +disable-logging = true + +; enforce a DOCUMENT_ROOT +php-docroot = /usr/share/webapps/%n +chdir = /usr/share/webapps/%n + +; limit allowed extensions +php-allowed-ext = .php +; and search for index.php if required +php-index = index.php + +; set php configuration for this instance of php, no need to edit global php.ini +php-set = date.timezone=Europe/Berlin +php-set = open_basedir=/usr/share/webapps/%n:/var/lib/%n:/var/cache/%n:/var/tmp/%n:/etc/webapps/%n:/var/log/%n:/dev/urandom:/usr/lib/php/modules:/proc/meminfo +; avoid security risk of leaving sessions in world-readable /tmp +;php-set = session.save_path=/tmp +php-set = session.save_path=/var/cache/%n/sessions +php-set = expose_php=false + +# php-set = memory_limit=512M +php-set = output_buffering=off + +; load all extensions only in this instance of php, no need to edit global php.ini +;; required core modules +php-set = extension=gd +;php-set = extension=zip # enabled by default in global php.ini +php-set = extension=yaml + +; opcache +php-set = zend_extension=opcache +php-set = opcache.enable=1 +;php-set = opcache.enable_cli=1 +php-set = opcache.interned_strings_buffer=8 +php-set = opcache.max_accelerated_files=10000 +php-set = opcache.memory_consumption=128 +php-set = opcache.save_comments=1 +php-set = opcache.revalidate_freq=1 + +; user cache +; provided by php-acpu, to be enabled **either** here **or** in /etc/php/conf.d/apcu.ini +php-set = extension=apcu.so +; per https://github.com/krakjoe/apcu/blob/simplify/INSTALL +php-set = apc.ttl=7200 +php-set = apc.enable_cli=1 |