-
-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure monitoring is accessible also with basic authentication (#3247)
* Fix Debian 11 bullseye problems with supervisord (kill_supervisord.sh did not work) * Ensure monitoring (/phpstatus) works even with basic authentication enabled * Add tests to make sure /phpstatus works on nginx and apache with basic auth enabled * Fix apache config in supervisord, add test to make sure phpstatus works * Simplify phpstatus test by just reloading webserver Co-authored-by: Gilbertsoft <25326036+gilbertsoft@users.noreply.github.com> Co-authored-by: Randy Fay <randy@randyfay.com>
- Loading branch information
1 parent
1574b48
commit 0ca78c5
Showing
11 changed files
with
61 additions
and
11 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
containers/ddev-webserver/ddev-webserver-base-files/etc/nginx/monitoring.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
containers/ddev-webserver/ddev-webserver-base-files/etc/supervisor/apache.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
[program:apache2] | ||
stopwaitsecs = 20 | ||
startretries=10 | ||
stopsignal = WINCH | ||
command=/usr/sbin/apache2ctl -k restart -D "FOREGROUND" | ||
stopsignal = TERM | ||
command=/usr/sbin/apache2ctl -D "FOREGROUND" | ||
# Great hints at https://advancedweb.hu/supervisor-with-docker-lessons-learned/ | ||
killasgroup=true | ||
stopasgroup=true | ||
priority=6 | ||
stdout_logfile=/proc/self/fd/2 | ||
stdout_logfile_maxbytes=0 | ||
redirect_stderr=true | ||
exitcodes=0,1 | ||
startsecs=1 # Must stay up 1 sec |
2 changes: 1 addition & 1 deletion
2
containers/ddev-webserver/ddev-webserver-base-files/etc/supervisor/conf.d/supervisor.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
containers/ddev-webserver/ddev-webserver-prod-files/etc/supervisor/apache.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
[program:apache2] | ||
stopwaitsecs = 20 | ||
startretries=10 | ||
stopsignal = WINCH | ||
command=/usr/sbin/apache2ctl -k restart -D "FOREGROUND" | ||
stopsignal = TERM | ||
command=/usr/sbin/apache2ctl -D "FOREGROUND" | ||
# Great hints at https://advancedweb.hu/supervisor-with-docker-lessons-learned/ | ||
killasgroup=true | ||
stopasgroup=true | ||
priority=6 | ||
stdout_logfile=/proc/self/fd/2 | ||
stdout_logfile_maxbytes=0 | ||
redirect_stderr=true | ||
exitcodes=0,1 | ||
startsecs=1 # Must stay up 1 sec |
2 changes: 1 addition & 1 deletion
2
containers/ddev-webserver/ddev-webserver-prod-files/etc/supervisor/conf.d/supervisor.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
containers/ddev-webserver/tests/ddev-webserver/testdata/apache/auth.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Directory /var/www/html> | ||
AuthType Basic | ||
AuthName "Restricted Files" | ||
# (Following line optional) | ||
AuthBasicProvider file | ||
AuthUserFile "/tmp/junkpass" | ||
Require valid-user | ||
</Directory> |
2 changes: 2 additions & 0 deletions
2
containers/ddev-webserver/tests/ddev-webserver/testdata/nginx/auth.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
auth_basic "Restricted Files"; | ||
auth_basic_user_file "/tmp/junkpass"; |
1 change: 1 addition & 0 deletions
1
containers/ddev-webserver/tests/ddev-webserver/testdata/nginx/junkpass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
junk:$apr1$NvBN0a6P$lqw25K4bRP.JmyyD1DKUA/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters