You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

apache-vhost.conf.j2 1.3KB

7 jaren geleden
7 jaren geleden
7 jaren geleden
6 jaren geleden
7 jaren geleden
6 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
6 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {{ ansible_managed | comment }}
  2. <VirtualHost *:443 *:8843>
  3. ServerName {{nextcloud_server_names|first}}
  4. {% for name in nextcloud_server_names | difference([nextcloud_server_names|first]) %}
  5. ServerAlias {{name}}
  6. {% endfor %}
  7. SSLEngine on
  8. SSLCertificateFile "/etc/ssl/certs/nextcloud.cert.pem"
  9. SSLCertificateKeyFile "/etc/ssl/private/nextcloud.key.pem"
  10. {% if not certificate_provider == "selfsigned" %}
  11. SSLCertificateChainFile "/etc/ssl/certs/nextcloud.chain.pem"
  12. {% endif %}
  13. {% if certificate_provider == "letsencrypt" %}
  14. Include /etc/letsencrypt/options-ssl-apache.conf
  15. {% endif %}
  16. DocumentRoot {{nextcloud_directory}}
  17. <Directory {{nextcloud_directory}}/>
  18. Options +FollowSymlinks
  19. AllowOverride All
  20. <IfModule mod_dav.c>
  21. Dav off
  22. </IfModule>
  23. SetEnv HOME {{nextcloud_directory}}
  24. SetEnv HTTP_HOME {{nextcloud_directory}}
  25. </Directory>
  26. ErrorLog ${APACHE_LOG_DIR}/error.log
  27. CustomLog ${APACHE_LOG_DIR}/access.log combined
  28. </VirtualHost>
  29. <VirtualHost *:80>
  30. ServerName {{nextcloud_server_names|first}}
  31. {% for name in nextcloud_server_names | difference(nextcloud_server_names|first) %}
  32. ServerAlias {{name}}
  33. {% endfor %}
  34. RewriteEngine On
  35. RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
  36. </VirtualHost>