annotate modules/website/files/conf.extra/html-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 aad5c00b0525
children f22809cba7af
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 # Make sure we have PHP
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 Include conf.extra/php.conf
112
5967c1b18860 Make sure that we don't leak PHP source code if something breaks
IBBoard <dev@ibboard.co.uk>
parents: 10
diff changeset
3
354
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
4 #
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
5 # Cause the PHP interpreter to handle files with a .html extension.
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
6 #
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
7 <FilesMatch "\.html$">
112
5967c1b18860 Make sure that we don't leak PHP source code if something breaks
IBBoard <dev@ibboard.co.uk>
parents: 10
diff changeset
8 AddType text/html .html
10
440ea809487c Add missing php.conf and make html-php config try index.html first as index
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
9
112
5967c1b18860 Make sure that we don't leak PHP source code if something breaks
IBBoard <dev@ibboard.co.uk>
parents: 10
diff changeset
10 #If we're doing HTML files as PHP then swap the priority for directory indexing
354
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
11 DirectoryIndex /index.html /index.php
aad5c00b0525 Switch to Apache "events" and PHP via FCGI
IBBoard <dev@ibboard.co.uk>
parents: 112
diff changeset
12
358
6c29af16b177 Fix PHP-as-html file serving
IBBoard <dev@ibboard.co.uk>
parents: 354
diff changeset
13 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
14 </FilesMatch>