Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

apache-vhost.conf.j2 1.2KB

7 lat temu
7 lat temu
4 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
7 lat temu
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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>