configure SSL properly, that is, only if a certificate is provided
This commit is contained in:
parent
72328a9f4b
commit
c39d6991bf
|
@ -210,6 +210,7 @@ if [ -x /usr/sbin/apache2 ]; then
|
||||||
a2enmod $php
|
a2enmod $php
|
||||||
s="apache2"
|
s="apache2"
|
||||||
fi
|
fi
|
||||||
|
if [ -e /etc/alternc/apache.pem ]; then
|
||||||
if ! grep '^Listen.*443$' /etc/apache2/ports.conf; then
|
if ! grep '^Listen.*443$' /etc/apache2/ports.conf; then
|
||||||
echo "Listen 443" >> /etc/apache2/ports.conf
|
echo "Listen 443" >> /etc/apache2/ports.conf
|
||||||
s="apache2"
|
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
|
ln -sf /etc/alternc/apache-ssl.conf /etc/apache2/conf.d/alternc-ssl.conf
|
||||||
s="apache2"
|
s="apache2"
|
||||||
fi
|
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
|
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
|
ln -sf /etc/alternc/apache2.conf /etc/apache2/conf.d/alternc.conf
|
||||||
s="apache2"
|
s="apache2"
|
||||||
|
|
Loading…
Reference in New Issue