ansible/roles/nextcloud/templates/apache2-vhost-ssl.conf

36 lines
1.0 KiB
ApacheConf

# Configuration for {{ nextcloud.url }}
# vim:ft=apache:
# Accept connections from non-SNI clients
SSLStrictSNIVHostCheck off
# Website configuration
<VirtualHost *:80>
ServerName {{ nextcloud.url }}
Redirect permanent / https://{{ nextcloud.url }}
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/pki/cert/crt/{{ nextcloud.url }}.crt
SSLCertificateKeyFile /etc/pki/cert/private/{{ nextcloud.url }}.key
SSLCertificateChainFile /etc/pki/cert/crt/{{ nextcloud.url}}-fullchain.crt
SSLProtocol {{ ssl_protocol }}
SSLCipherSuite {{ ssl_cipher_suite }}
<FilesMatch "\.(cgi|shtml|phtml|php)$">\
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
ServerName {{ nextcloud.url }}
DocumentRoot {{ nextcloud_webroot }}
<Directory "{{ nextcloud_webroot }}">
Require all granted
AllowOverride All
Options MultiViews FollowSymlinks
</Directory>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
</IfModule>
</VirtualHost>