This repository was archived by the owner on Jul 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +62
-0
lines changed
fixture/apache/var/www/public_html Expand file tree Collapse file tree 4 files changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Summary of release changes.
2020- Adds improved test workflow; added ` test-setup ` target to Makefile.
2121- Adds Makefile target ` logsdef ` to handle deferred logs output within a target chain.
2222- Adds ` /docs ` directory for supplementary documentation and simplify README.
23+ - Adds test case for Apache ` DirectoryIndex ` default.
2324- Fixes validation failure of 0 second --timeout value in ` test/health_status ` .
2425- Removes PHP-FPM status handler configuration from the Apache server-status drop-in.
2526
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < title > {{TITLE}}</ title >
5+ </ head >
6+ < body >
7+ {{BODY}}
8+ </ body >
9+ </ html >
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ <html>
3+ <head>
4+ <title>{{TITLE}}</title>
5+ <meta name="php_version" content="<?php echo PHP_VERSION ?> ">
6+ </head>
7+ <body>
8+ {{BODY}}
9+ </body>
10+ </html>
Original file line number Diff line number Diff line change @@ -670,6 +670,48 @@ ${other_required_apache_modules}
670670 end
671671 end
672672
673+ describe " Apache DirectoryIndex"
674+ it " Defaults to index.html"
675+ __terminate_container \
676+ apache-php.1 \
677+ & > /dev/null
678+
679+ docker run \
680+ --detach \
681+ --no-healthcheck \
682+ --name apache-php.1 \
683+ --publish ${DOCKER_PORT_MAP_TCP_80} :80 \
684+ --volume ${PWD} /test/fixture/apache/var/www/public_html:/opt/app/public_html:ro \
685+ jdeathe/centos-ssh-apache-php-fcgi:latest \
686+ & > /dev/null
687+
688+ if ! __is_container_ready \
689+ apache-php.1 \
690+ ${STARTUP_TIME} \
691+ " /usr/sbin/httpd(\.worker|\.event)? " \
692+ " [[ 000 != \$ (curl -sI -o /dev/null -w %{http_code} localhost/) ]]"
693+ then
694+ exit 1
695+ fi
696+
697+ container_hostname=" $(
698+ docker exec \
699+ apache-php.1 \
700+ hostname
701+ ) "
702+
703+ curl_get_request=" $(
704+ curl -s \
705+ --header " Host: ${container_hostname} " \
706+ http://127.0.0.1:${container_port_80} /
707+ ) "
708+
709+ assert equal \
710+ " ${curl_get_request} " \
711+ " ${content_index_html} "
712+ end
713+ end
714+
673715 __terminate_container \
674716 apache-php.1 \
675717 & > /dev/null
You can’t perform that action at this time.
0 commit comments