mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-09 00:32:05 -04:00
move docker apache subdomain setup files to /tools/subdomain1
This commit is contained in:
parent
492cde149c
commit
49a74079bb
3 changed files with 25 additions and 25 deletions
27
.github/prepare_debian.sh
vendored
27
.github/prepare_debian.sh
vendored
|
|
@ -80,33 +80,10 @@ a2ensite default-ssl
|
|||
rm /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
rm /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
openssl req -nodes -newkey rsa:2048 -x509 -sha256 -days 365 -nodes -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem -subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=$(hostname)"
|
||||
|
||||
# add a subdomain for testing
|
||||
cat >/etc/apache2/sites-available/subdomain1.conf <<EOL
|
||||
<VirtualHost *:80>
|
||||
ServerName subdomain1.localhost.com
|
||||
DocumentRoot /var/www/subdomain1
|
||||
|
||||
ErrorLog \${APACHE_LOG_DIR}/subdomain1_error.log
|
||||
CustomLog \${APACHE_LOG_DIR}/subdomain1_access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName subdomain1.localhost.com
|
||||
DocumentRoot /var/www/subdomain1
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
|
||||
ErrorLog \${APACHE_LOG_DIR}/subdomain1_ssl_error.log
|
||||
CustomLog \${APACHE_LOG_DIR}/subdomain1_ssl_access.log combined
|
||||
</VirtualHost>
|
||||
EOL
|
||||
cp tools/subdomain1/subdomain1.conf /etc/apache2/sites-available/
|
||||
mkdir -p /var/www/subdomain1
|
||||
cat >/var/www/subdomain1/index.php <<EOL
|
||||
Subdomain: subdomain1.localhost.com
|
||||
EOL
|
||||
cp tools/subdomain1/index.php /var/www/subdomain1/
|
||||
echo '127.0.0.1 subdomain1.localhost' >> /etc/hosts
|
||||
echo '127.0.0.1 subdomain1.localhost.com' >> /etc/hosts
|
||||
apache2ctl configtest
|
||||
|
|
|
|||
1
tools/subdomain1/index.php
Normal file
1
tools/subdomain1/index.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
Subdomain: subdomain1.localhost.com
|
||||
22
tools/subdomain1/subdomain1.conf
Normal file
22
tools/subdomain1/subdomain1.conf
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# This apache configuration file is used testing
|
||||
# check_curl tests use this subdomain to see if --noproxy works on subdomains of a domain.
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName subdomain1.localhost.com
|
||||
DocumentRoot /var/www/subdomain1
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/subdomain1_error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/subdomain1_access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName subdomain1.localhost.com
|
||||
DocumentRoot /var/www/subdomain1
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/subdomain1_ssl_error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/subdomain1_ssl_access.log combined
|
||||
</VirtualHost>
|
||||
Loading…
Reference in a new issue