update config
authorMichael Wallner <root@s201809.m6w6.name>
Sat, 9 Mar 2019 12:51:16 +0000 (13:51 +0100)
committerMichael Wallner <root@s201809.m6w6.name>
Sat, 9 Mar 2019 12:51:16 +0000 (13:51 +0100)
etc/apache2.conf
etc/fpm-pool.conf [new file with mode: 0644]

index b1e8fe6fd0bacec6462b6ffc1edffb4d812a3bf4..9b40c99818b4cefccdcde685e8781d959e11f83e 100644 (file)
@@ -1,13 +1,22 @@
 <Macro mdref_host_defs>
-       ServerName mdref.m6w6m.name
+       ServerName mdref.m6w6.name
        ServerAdmin webmaster@m6w6.name
 
        DocumentRoot /var/www/mdref/mdref/public
 
        <Directory /var/www/mdref/mdref/public>
-               Options Indexes FollowSymLinks
-               AllowOverride All
+               AllowOverride None
                Require all granted
+               DirectorySlash Off
+               RewriteEngine On
+               RewriteCond %{REQUEST_FILENAME} -f [OR]
+               RewriteCond %{REQUEST_FILENAME} -d [OR]
+               RewriteCond %{REQUEST_FILENAME} -l
+               RewriteRule ^ - [L]
+               RewriteRule ^ index.php [L]
+               <FilesMatch ".+\.ph(p|tml)$">
+                       SetHandler "proxy:unix:/run/php/php-mdref.sock|fcgi://localhost"
+               </FilesMatch>
        </Directory>
 </Macro>
 
diff --git a/etc/fpm-pool.conf b/etc/fpm-pool.conf
new file mode 100644 (file)
index 0000000..98e5134
--- /dev/null
@@ -0,0 +1,43 @@
+; Start a new pool named 'www'.
+; the variable $pool can be used in any directive and will be replaced by the
+; pool name ('www' here)
+[mdref]
+
+user = www-data
+group = www-data
+
+listen = /run/php/php-$pool.sock
+listen.owner = www-data
+listen.group = www-data
+;listen.mode = 0660
+
+pm = dynamic
+pm.max_children = 20
+pm.start_servers = 2
+pm.min_spare_servers = 1
+pm.max_spare_servers = 3
+;pm.max_requests = 500
+
+slowlog = /var/log/php-fpm.log.slow
+request_slowlog_timeout = 30
+
+; Depth of slow log stack trace.
+; Default Value: 20
+;request_slowlog_trace_depth = 20
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+chdir = /var/www/$pool
+
+; Note: set an empty value to allow all extensions.
+; Default Value: .php
+security.limit_extensions = .php
+