apache: Add support for mod_ssl in addition to mod_gnutls

Depending on which module is enabled, different configuration is used.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-02-09 12:28:06 -05:00
1 parent 511f5c09c0
commit e36a4b85ee
1 file changed
+26
@@ -1,4 +1,6 @@
<Macro FreedomBoxTLSSiteMacro $domain>
# mod_gnutls default options. See /etc/apache2/site-available/default-tls.conf
<IfModule mod_gnutls.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
@@ -16,4 +18,28 @@
GnuTLSPriorities NORMAL
</VirtualHost>
</IfModule>
# mod_ssl default options. See /etc/apache2/site-available/default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
ServerName $domain
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
# Automatically obtained certificates from Let's Encrypt
SSLCertificateFile /etc/letsencrypt/live/$domain/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/$domain/privkey.pem
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
</Macro>