diff options
Diffstat (limited to '.github/prepare_debian.sh')
| -rwxr-xr-x | .github/prepare_debian.sh | 21 |
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 |
| 70 | sed '/^::1/d' /etc/hosts > /tmp/hosts | 70 | # sed '/^::1/d' /etc/hosts > /tmp/hosts |
| 71 | cp -f /tmp/hosts /etc/hosts | 71 | # cp -f /tmp/hosts /etc/hosts |
| 72 | ip addr show | 72 | # ip addr show |
| 73 | cat /etc/hosts | 73 | # cat /etc/hosts |
| 74 | 74 | ||
| 75 | # apache | 75 | # apache |
| 76 | a2enmod ssl | 76 | a2enmod ssl |
| @@ -80,6 +80,19 @@ a2ensite default-ssl | |||
| 80 | rm /etc/ssl/certs/ssl-cert-snakeoil.pem | 80 | rm /etc/ssl/certs/ssl-cert-snakeoil.pem |
| 81 | rm /etc/ssl/private/ssl-cert-snakeoil.key | 81 | rm /etc/ssl/private/ssl-cert-snakeoil.key |
| 82 | 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)" | 82 | 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)" |
| 83 | # add a subdomain for testing | ||
| 84 | cp tools/subdomain1/subdomain1.conf /etc/apache2/sites-available/ | ||
| 85 | mkdir -p /var/www/subdomain1 | ||
| 86 | cp tools/subdomain1/index.php /var/www/subdomain1/ | ||
| 87 | echo '127.0.0.1 subdomain1.localhost' >> /etc/hosts | ||
| 88 | echo '127.0.0.1 subdomain1.localhost.com' >> /etc/hosts | ||
| 89 | apache2ctl configtest | ||
| 90 | a2ensite subdomain1.conf | ||
| 91 | |||
| 92 | # Make it listen to both IPv4 on IPv6 on localhost | ||
| 93 | sed -i 's/^Listen 80/Listen 0.0.0.0:80\nListen [::1]:80/' /etc/apache2/ports.conf | ||
| 94 | sed -i 's/^[[:space:]]*Listen 443/Listen 0.0.0.0:443\nListen [::1]:443/' /etc/apache2/ports.conf | ||
| 95 | |||
| 83 | service apache2 restart | 96 | service apache2 restart |
| 84 | 97 | ||
| 85 | # squid | 98 | # squid |
