Skip to content

Commit f93dccd

Browse files
authored
Merge pull request #321 from andrewnicols/fallbackResourceDisabled
Disable Apache FallbackResource for faildumps
2 parents e9b4589 + 84baa34 commit f93dccd

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

assets/web/apache2_faildumps.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,20 @@
22
Options +Indexes
33
</Directory>
44

5+
<Location "/_/">
6+
FallbackResource disabled
7+
</Location>
8+
59
Alias /_/faildumps /var/www/behatfaildumps
610

11+
# Set the handler to use for files whose extension ends in `.php`.
12+
# This is a workaround for https://github.com/docker-library/php/issues/1576
13+
# The FallbackResource is a default Handler action which is only used if a Handler has not already been applied.
14+
# The docker/php image sets the handler unconditionally for any file whose name matches `.php`.
15+
# This configuration block unsets the default handler, and instead only applies it if the file exists.
16+
<FilesMatch \.php$>
17+
SetHandler none
18+
<If "-f %{REQUEST_FILENAME}">
19+
SetHandler application/x-httpd-php
20+
</If>
21+
</FilesMatch>

base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
- db
66
volumes:
77
- "${MOODLE_DOCKER_WWWROOT}:/var/www/html"
8-
- "${ASSETDIR}/web/apache2_faildumps.conf:/etc/apache2/conf-enabled/apache2_faildumps.conf"
8+
- "${ASSETDIR}/web/apache2_faildumps.conf:/etc/apache2/conf-enabled/moodle-faildump.conf"
99
environment:
1010
MOODLE_DOCKER_RUNNING: 1
1111
MOODLE_DOCKER_DBNAME: moodle

0 commit comments

Comments
 (0)