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

30 lines
841 B
Plaintext
Raw Normal View History

2020-02-05 22:09:35 -06:00
# Configuration for {{ nextcloud_url }}
2020-02-05 21:54:30 -06:00
# vim:ft=apache:
2020-02-05 22:09:35 -06:00
# Listen for virtual host requests
NameVirtualHost *:443
# Accept connections from non-SNI clients
SSLStrictSNIVHostCheck off
# Website configuration
2020-02-05 21:54:30 -06:00
<VirtualHost *:80>
2020-02-05 22:09:35 -06:00
ServerName {{ nextcloud_url }}
2020-02-05 22:28:03 -06:00
# Uncomment me for HTTPS redirection
# Leaving it off for now for testing
#Redirect permanent / https://{{ nextcloud_url }}
2020-02-05 22:09:35 -06:00
DocumentRoot {{ nextcloud_webroot }}
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/pki/cert/crt/{{ nextcloud_url }}.crt
SSLCertificateKeyFile /etc/pki/cert/private/{{ nextcloud_url }}.key
2020-02-05 22:28:03 -06:00
<FilesMatch "\.(cgi|shtml|phtml|php)$">\
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
2020-02-05 22:09:35 -06:00
ServerName {{ nextcloud_url }}
2020-02-05 22:10:25 -06:00
DocumentRoot {{ nextcloud_webroot }}
2020-02-05 21:54:30 -06:00
</VirtualHost>