r/nextcloud: Fix a bunch of deployment warnings
The Nextcloud administration overview page listed a bunch of deployment configuration warnings that needed to be addressed: * Set the default phone region * Define a maintenance window starting at 0600 UTC * Increase the PHP memory limit to 1GiB * Increase the PHP OPCache interned strings buffer size * Increase the allowed PHP OPcache memory limit * Fix Apache rewrite rules for /.well-known pathsmaster
parent
6cd576dd2b
commit
1c1bff3ec0
|
@ -36,6 +36,15 @@
|
||||||
group: apache
|
group: apache
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
- name: ensure php is configured for nextcloud
|
||||||
|
template:
|
||||||
|
src: php.ini.j2
|
||||||
|
dest: /etc/php.d/60-nextcloud.ini
|
||||||
|
mode: '0644'
|
||||||
|
notify:
|
||||||
|
- restart php-fpm
|
||||||
|
tags:
|
||||||
|
- php-config
|
||||||
|
|
||||||
- name: ensure php-fpm is configured for nextcloud
|
- name: ensure php-fpm is configured for nextcloud
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -47,6 +47,8 @@ $CONFIG = array (
|
||||||
'ldapIgnoreNamingRules' => false,
|
'ldapIgnoreNamingRules' => false,
|
||||||
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
|
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
|
||||||
'maintenance' => {{ nextcloud_maintenance|bool|string|lower }},
|
'maintenance' => {{ nextcloud_maintenance|bool|string|lower }},
|
||||||
|
'maintenance_window_start' => 6,
|
||||||
|
'default_phone_region' => 'US',
|
||||||
'theme' => '',
|
'theme' => '',
|
||||||
'trashbin_retention_obligation' => 'auto, 30',
|
'trashbin_retention_obligation' => 'auto, 30',
|
||||||
'loglevel' => 2,
|
'loglevel' => 2,
|
||||||
|
|
|
@ -19,6 +19,10 @@ Dav off
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
Options -MultiViews
|
Options -MultiViews
|
||||||
|
RewriteRule ^\.well-known/carddav /remote.php/dav [R=301,L]
|
||||||
|
RewriteRule ^\.well-known/caldav /remote.php/dav [R=301,L]
|
||||||
|
RewriteRule ^\.well-known/webfinger /index.php/.well-known/webfinger [R=301,L]
|
||||||
|
RewriteRule ^\.well-known/nodeinfo /index.php/.well-known/nodeinfo [R=301,L]
|
||||||
RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
|
RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
|
||||||
RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
|
RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
|
||||||
RewriteCond %{REQUEST_FILENAME} !\.(css|js|mjs|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4)$
|
RewriteCond %{REQUEST_FILENAME} !\.(css|js|mjs|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4)$
|
||||||
|
@ -56,7 +60,3 @@ Require all granted
|
||||||
<Directory /var/lib/nextcloud/data/>
|
<Directory /var/lib/nextcloud/data/>
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
Redirect 301 /.well-known/carddav /remote.php/carddav
|
|
||||||
Redirect 301 /.well-known/caldav /remote.php/caldav
|
|
||||||
Redirect 301 /.well-known/webdav /remote.php/webdav
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
apc.enable_cli=1
|
||||||
|
memory_limit=1024M
|
||||||
|
opcache.interned_strings_buffer=100
|
||||||
|
opcache.memory_consumption=256
|
|
@ -423,7 +423,7 @@ slowlog = /var/log/php-fpm/www-slow.log
|
||||||
;php_flag[display_errors] = off
|
;php_flag[display_errors] = off
|
||||||
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
|
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
|
||||||
php_admin_flag[log_errors] = on
|
php_admin_flag[log_errors] = on
|
||||||
php_admin_value[memory_limit] = 512M
|
;php_admin_value[memory_limit] = 512M
|
||||||
|
|
||||||
; Set the following data paths to directories owned by the FPM process user.
|
; Set the following data paths to directories owned by the FPM process user.
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue