view modules/website/files/conf.extra/html-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 f354100b688a
children
line wrap: on
line source

#
# Cause the PHP interpreter to handle files with a .html extension.
#
<FilesMatch "\.html$">
	AddType text/html .html

	#If we're doing HTML files as PHP then swap the priority for directory indexing
	DirectoryIndex index.html index.php

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule . /error.php [L]

	SetHandler "proxy:unix:/run/php-fpm.sock|fcgi://localhost/"
</FilesMatch>