summaryrefslogtreecommitdiffstats
path: root/.github/prepare_debian.sh
diff options
context:
space:
mode:
Diffstat (limited to '.github/prepare_debian.sh')
-rwxr-xr-x.github/prepare_debian.sh21
1 files changed, 17 insertions, 4 deletions
diff --git a/.github/prepare_debian.sh b/.github/prepare_debian.sh
index cffe98c5..15c2286c 100755
--- a/.github/prepare_debian.sh
+++ b/.github/prepare_debian.sh
@@ -67,10 +67,10 @@ apt-get -y install perl \
67 libjson-perl 67 libjson-perl
68 68
69# remove ipv6 interface from hosts 69# remove ipv6 interface from hosts
70sed '/^::1/d' /etc/hosts > /tmp/hosts 70# sed '/^::1/d' /etc/hosts > /tmp/hosts
71cp -f /tmp/hosts /etc/hosts 71# cp -f /tmp/hosts /etc/hosts
72ip addr show 72# ip addr show
73cat /etc/hosts 73# cat /etc/hosts
74 74
75# apache 75# apache
76a2enmod ssl 76a2enmod ssl
@@ -80,6 +80,19 @@ a2ensite default-ssl
80rm /etc/ssl/certs/ssl-cert-snakeoil.pem 80rm /etc/ssl/certs/ssl-cert-snakeoil.pem
81rm /etc/ssl/private/ssl-cert-snakeoil.key 81rm /etc/ssl/private/ssl-cert-snakeoil.key
82openssl 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)" 82openssl 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)"
83# add a subdomain for testing
84cp tools/subdomain1/subdomain1.conf /etc/apache2/sites-available/
85mkdir -p /var/www/subdomain1
86cp tools/subdomain1/index.php /var/www/subdomain1/
87echo '127.0.0.1 subdomain1.localhost' >> /etc/hosts
88echo '127.0.0.1 subdomain1.localhost.com' >> /etc/hosts
89apache2ctl configtest
90a2ensite subdomain1.conf
91
92# Make it listen to both IPv4 on IPv6 on localhost
93sed -i 's/^Listen 80/Listen 0.0.0.0:80\nListen [::1]:80/' /etc/apache2/ports.conf
94sed -i 's/^[[:space:]]*Listen 443/Listen 0.0.0.0:443\nListen [::1]:443/' /etc/apache2/ports.conf
95
83service apache2 restart 96service apache2 restart
84 97
85# squid 98# squid