ansible-roles/webapps/nextcloud/templates/apache.conf.j2
Eric Morino aee925d667
All checks were successful
gitea/ansible-roles/pipeline/head This commit looks good
Add php configuration for apache and cli globaly
2022-08-26 16:28:30 +02:00

34 lines
1 KiB
Django/Jinja

<VirtualHost *:80>
ServerName {{ nextcloud_domains | join(' ') }}
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_instance_name }} {{ nextcloud_instance_name }}
# 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
# REWRITE
UseCanonicalName On
RewriteEngine On
RewriteCond %{HTTP_HOST} !^{{ nextcloud_domains | join(' ') }}$
RewriteRule ^/(.*) http://%{SERVER_NAME}/$1 [L,R]
# PHP
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f {{ nextcloud_instance_name }}"
php_admin_value open_basedir "/usr/share/php:/home/{{ nextcloud_instance_name }}:/tmp"
</VirtualHost>