annotate modules/website/files/php.conf @ 427:3744cd0807cb

Move PHP socket to /run/ My assumptions in f354100b688a were wrong and CentOS _will_ sometimes clean up /run, so we can't use sub-directories and altering the script is too much trouble when it assumes the dir will exist because its default one is packaged in the RPM
author IBBoard <dev@ibboard.co.uk>
date Sat, 15 Oct 2022 15:38:08 +0100
parents 731107a67700
children 83fbddb56de1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 #
354
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
2 # The following lines prevent .user.ini files from being viewed by Web clients.
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 #
354
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
4 <Files ".user.ini">
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
5 Require all denied
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
6 </Files>
412
731107a67700 Try to optimise PHP settings
IBBoard <dev@ibboard.co.uk>
parents: 400
diff changeset
7 <Proxy "fcgi://localhost/" enablereuse=on max=50 smax=25 ttl=60>
357
ff228d581972 Reconfigure PHP-FPM to run from a Unix socket
IBBoard <dev@ibboard.co.uk>
parents: 354
diff changeset
8 </Proxy>
354
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
9 <FilesMatch "\.php$">
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
10 # Don't wrap in an <IfModule> because we'd rather it failed
365
f22809cba7af Make sure missing HTML and PHP files get error handled
IBBoard <dev@ibboard.co.uk>
parents: 361
diff changeset
11 RewriteCond %{REQUEST_FILENAME} !-f
f22809cba7af Make sure missing HTML and PHP files get error handled
IBBoard <dev@ibboard.co.uk>
parents: 361
diff changeset
12 RewriteRule . /error.php [L]
f22809cba7af Make sure missing HTML and PHP files get error handled
IBBoard <dev@ibboard.co.uk>
parents: 361
diff changeset
13
427
3744cd0807cb Move PHP socket to /run/
IBBoard <dev@ibboard.co.uk>
parents: 412
diff changeset
14 SetHandler "proxy:unix:/run/php-fpm.sock|fcgi://localhost/"
354
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
15 </FilesMatch>