annotate modules/website/files/php.conf @ 358:6c29af16b177

Fix PHP-as-html file serving
author IBBoard <dev@ibboard.co.uk>
date Sat, 03 Oct 2020 19:41:25 +0100
parents ff228d581972
children 5be4616ffca0
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>
357
ff228d581972 Reconfigure PHP-FPM to run from a Unix socket
IBBoard <dev@ibboard.co.uk>
parents: 354
diff changeset
7 <Proxy "fcgi://localhost/" enablereuse=on max=50>
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
357
ff228d581972 Reconfigure PHP-FPM to run from a Unix socket
IBBoard <dev@ibboard.co.uk>
parents: 354
diff changeset
11 SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost/"
354
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
12 </FilesMatch>