Fix index.html fallback

If an index.html was added to a root of a directory it would not show, the fallback options do not work. This fixes that issue.
This commit is contained in:
Jordy 2022-04-05 16:39:37 +02:00 committed by GitHub
parent ebca910786
commit deac0eaf44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -235,7 +235,12 @@ export default (domain, domains, global, ipPortPairs) => {
// index.php
if (domain.routing.index.computed === 'index.php') {
serverConfig.push(['# index.php', '']);
serverConfig.push(['index', 'index.php']);
serverConfig.push(['index', 'index.php' + domain.routing.fallbackHtml.computed ? ' index.html' : '']);
}
if (domain.routing.index.computed === 'index.html') {
serverConfig.push(['# index.php', '']);
serverConfig.push(['index', 'index.html' + domain.routing.fallbackPhp.computed ? ' index.php' : '']);
}
// Fallback index.html or index.php