mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
letsencrypt: Use macros for configuring sites
Makes it trivial to alter site configuration for all domains at once. Also possible to easily switch to TLS modules other than mod_gnutls. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
a48471680d
commit
91ba56e3ce
3 files changed
+118
-75
No files matched your search
@@ -0,0 +1,37 @@
|
||||
<Macro FreedomBoxTLSSiteMacro $domain>
|
||||
<IfModule mod_gnutls.c>
|
||||
<VirtualHost _default_:443>
|
||||
ServerAdmin webmaster@localhost
|
||||
ServerName $domain
|
||||
DocumentRoot /var/www/html
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
<Directory /var/www/html>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
||||
<Directory "/usr/lib/cgi-bin">
|
||||
AllowOverride None
|
||||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
|
||||
LogLevel warn
|
||||
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
|
||||
# GnuTLS Switch: Enable/Disable SSL/TLS for this virtual host.
|
||||
GnuTLSEnable On
|
||||
# Automatically obtained certificates from Let's Encrypt
|
||||
GnuTLSCertificateFile /etc/letsencrypt/live/$domain/fullchain.pem
|
||||
GnuTLSKeyFile /etc/letsencrypt/live/$domain/privkey.pem
|
||||
# See http://www.outoforder.cc/projects/apache/mod_gnutls/docs/#GnuTLSPriorities
|
||||
GnuTLSPriorities NORMAL
|
||||
</VirtualHost>
|
||||
</IfModule>
|
||||
</Macro>
|
||||
Reference in new issue
Block a user