forked from wapiti-scanner/wapiti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for https_redirect module
- Loading branch information
1 parent
6b1d60d
commit 34e7ea4
Showing
18 changed files
with
2,521 additions
and
2 deletions.
There are no files selected for viewing
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
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,21 @@ | ||
ARG PHP_HASH_TAG=':8.1-apache' | ||
FROM php${PHP_HASH_TAG} | ||
EXPOSE 443 80 8443 8080 | ||
|
||
RUN apt-get -y update && \ | ||
apt-get -y install openssl -y && \ | ||
apt-get -y clean && \ | ||
apt-get -y autoremove && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ | ||
truncate -s 0 /var/log/*log | ||
|
||
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ | ||
-keyout /etc/apache2/server.key -out /etc/apache2/server.crt \ | ||
-subj "/C=US/ST=State/L=City/O=Organization/OU=Unit/CN=localhost" | ||
|
||
RUN /usr/sbin/a2enmod rewrite ssl | ||
|
||
COPY ./apache_conf/000-default.conf /etc/apache2/sites-available/000-default.conf | ||
|
||
# Start Apache | ||
CMD ["apache2-foreground"] |
26 changes: 26 additions & 0 deletions
26
tests/integration/test_mod_https_redirect/apache_conf/000-default.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,26 @@ | ||
Listen 8080 | ||
NameVirtualHost *:8080 | ||
|
||
Listen 8443 https | ||
NameVirtualHost *:8443 | ||
|
||
<VirtualHost *:80 *:8080> | ||
ServerName https_redirect | ||
DocumentRoot /var/www/html/ | ||
<Directory /var/www/html/> | ||
AllowOverride All | ||
</Directory> | ||
|
||
</VirtualHost> | ||
|
||
<VirtualHost *:443 *:8443> | ||
ServerName https_redirect | ||
DocumentRoot /var/www/html/ | ||
<Directory /var/www/html/> | ||
AllowOverride All | ||
</Directory> | ||
|
||
SSLEngine on | ||
SSLCertificateFile /etc/apache2/server.crt | ||
SSLCertificateKeyFile /etc/apache2/server.key | ||
</VirtualHost> |
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 @@ | ||
../../check.sh |
Oops, something went wrong.