ansible-roles/webapps/nextcloud/templates/apache.conf.j2
Ludovic Poujol d5e34d0a77 webapp/nextcloud: Multiple changes in vhost
- Have only one domain as ServerName (otherwise you get an invalid apache config
- Add all other domains as ServerAlias
- Remove auto redirect vers ServerName
- Correct indentation
2022-09-01 12:46:37 +02:00

32 lines
884 B
Django/Jinja

<VirtualHost *:80>
ServerName {{ nextcloud_domains[0] }}
{% for domain_alias in nextcloud_domains[1:] %}
ServerAlias {{ domain_alias }}
{% endfor %}
DocumentRoot {{ nextcloud_webroot }}/
<Directory {{ nextcloud_webroot }}/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
# user - group (thanks to sesse@debian.org)
AssignUserID {{ nextcloud_user }} {{ nextcloud_user }}
# LOG
CustomLog /var/log/apache2/access.log vhost_combined
CustomLog /home/{{ nextcloud_instance_name }}/log/access.log combined
ErrorLog /home/{{ nextcloud_instance_name }}/log/error.log
# PHP
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f {{ nextcloud_user }}"
php_admin_value open_basedir "/usr/share/php:{{ nextcloud_home }}:/tmp"
</VirtualHost>