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
This commit is contained in:
parent
1ad3e0de37
commit
d5e34d0a77
|
@ -1,5 +1,9 @@
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName {{ nextcloud_domains | join(' ') }}
|
ServerName {{ nextcloud_domains[0] }}
|
||||||
|
|
||||||
|
{% for domain_alias in nextcloud_domains[1:] %}
|
||||||
|
ServerAlias {{ domain_alias }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
DocumentRoot {{ nextcloud_webroot }}/
|
DocumentRoot {{ nextcloud_webroot }}/
|
||||||
|
|
||||||
|
@ -14,21 +18,15 @@
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
# user - group (thanks to sesse@debian.org)
|
# user - group (thanks to sesse@debian.org)
|
||||||
AssignUserID {{ nextcloud_instance_name }} {{ nextcloud_instance_name }}
|
AssignUserID {{ nextcloud_user }} {{ nextcloud_user }}
|
||||||
|
|
||||||
# LOG
|
# LOG
|
||||||
CustomLog /var/log/apache2/access.log vhost_combined
|
CustomLog /var/log/apache2/access.log vhost_combined
|
||||||
CustomLog /home/{{ nextcloud_instance_name }}/log/access.log combined
|
CustomLog /home/{{ nextcloud_instance_name }}/log/access.log combined
|
||||||
ErrorLog /home/{{ nextcloud_instance_name }}/log/error.log
|
ErrorLog /home/{{ nextcloud_instance_name }}/log/error.log
|
||||||
|
|
||||||
# REWRITE
|
|
||||||
UseCanonicalName On
|
|
||||||
RewriteEngine On
|
|
||||||
RewriteCond %{HTTP_HOST} !^{{ nextcloud_domains | join(' ') }}$
|
|
||||||
RewriteRule ^/(.*) http://%{SERVER_NAME}/$1 [L,R]
|
|
||||||
|
|
||||||
# PHP
|
# PHP
|
||||||
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f {{ nextcloud_instance_name }}"
|
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f {{ nextcloud_user }}"
|
||||||
php_admin_value open_basedir "/usr/share/php:/home/{{ nextcloud_instance_name }}:/tmp"
|
php_admin_value open_basedir "/usr/share/php:{{ nextcloud_home }}:/tmp"
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
Loading…
Reference in a new issue