configure SSL properly, that is, only if a certificate is provided

This commit is contained in:
Antoine Beaupré 2008-10-07 18:28:39 +00:00
parent 72328a9f4b
commit c39d6991bf
1 changed files with 16 additions and 11 deletions

View File

@ -210,6 +210,7 @@ if [ -x /usr/sbin/apache2 ]; then
a2enmod $php
s="apache2"
fi
if [ -e /etc/alternc/apache.pem ]; then
if ! grep '^Listen.*443$' /etc/apache2/ports.conf; then
echo "Listen 443" >> /etc/apache2/ports.conf
s="apache2"
@ -222,6 +223,10 @@ if [ -x /usr/sbin/apache2 ]; then
ln -sf /etc/alternc/apache-ssl.conf /etc/apache2/conf.d/alternc-ssl.conf
s="apache2"
fi
else
echo "SSL not configured"
echo "create a certificate in /etc/alternc/apache.pem and rerun alternc.install"
fi
if [ ! -h /etc/apache2/conf.d/alternc.conf ] && [ -e /etc/apache2/conf.d/ ]; then
ln -sf /etc/alternc/apache2.conf /etc/apache2/conf.d/alternc.conf
s="apache2"