comparison modules/website/files/conf.extra/html-php.conf @ 365:f22809cba7af

Make sure missing HTML and PHP files get error handled Without this we just get "file not found" from php-fpm. We could override the proxy response with Apache, but that would break NextCloud login, which gives 4xx pages with login forms etc that we don't want replaced with generic pages.
author IBBoard <dev@ibboard.co.uk>
date Sat, 07 Nov 2020 14:33:17 +0000
parents 6c29af16b177
children 957d7ddef6d0
comparison
equal deleted inserted replaced
364:8224f42ee05b 365:f22809cba7af
8 AddType text/html .html 8 AddType text/html .html
9 9
10 #If we're doing HTML files as PHP then swap the priority for directory indexing 10 #If we're doing HTML files as PHP then swap the priority for directory indexing
11 DirectoryIndex /index.html /index.php 11 DirectoryIndex /index.html /index.php
12 12
13 RewriteCond %{REQUEST_FILENAME} !-f
14 RewriteRule . /error.php [L]
15
13 SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost/" 16 SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost/"
14 </FilesMatch> 17 </FilesMatch>