Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

50 rindas
1.2KB

  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. Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
  14. DocumentRoot {{nextcloud_directory}}
  15. <Directory {{nextcloud_directory}}/>
  16. Options +FollowSymlinks
  17. AllowOverride All
  18. <IfModule mod_dav.c>
  19. Dav off
  20. </IfModule>
  21. SetEnv HOME {{nextcloud_directory}}
  22. SetEnv HTTP_HOME {{nextcloud_directory}}
  23. </Directory>
  24. ErrorLog ${APACHE_LOG_DIR}/error.log
  25. CustomLog ${APACHE_LOG_DIR}/access.log combined
  26. </VirtualHost>
  27. <VirtualHost *:80>
  28. ServerName {{nextcloud_server_names|first}}
  29. {% for name in nextcloud_server_names | difference(nextcloud_server_names|first) %}
  30. ServerAlias {{name}}
  31. {% endfor %}
  32. RewriteEngine On
  33. RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
  34. </VirtualHost>