nc-kay
February 3, 2022, 2:44pm
1
Irgendwas ist ja immer.
Fehlermeldung:
Sicherheits- & Einrichtungswarnungen
Für die Sicherheit und Performance Deiner Instanz ist es wichtig, dass alles richtig konfiguriert ist. Um Dir dabei zu helfen, führen wir einige automatische Prüfungen durch. Weitere Informationen kannst Du der verlinkten Dokumentation entnehmen.
Es gibt einige Fehler bei Deiner Systemkonfiguration.
Die PHP-Speichergrenze liegt unterhalb des empfohlenen Wertes von 512MB.
Bitte überprüfe noch einmal die Installationsanleitungen und kontrolliere das Protokoll auf mögliche Fehler oder Warnungen.
Lösung, die user.ini ist anzupassen:
cat /var/www/nextcloud/.user.ini
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
output_buffering=0
memory_limit = 512M
Schon fast Routine.
MfG
nc-kay
Du kannst das Limit auch global ändern. Vielleicht ist es dann beim nächsten Update auch nicht verändert.
Link
1 Like
nc-kay
February 4, 2022, 3:45pm
3
Danke für den Hinweis.
Einen nginx Server nutze ich, wo genau ändere ich was?
Global für jeden virtuellen Host
In nginx lässt sich die entsprechende Einstellung auch innerhalb des Server-Blocks setzen und gilt somit für einen ganzen virtuelle Host. Üblicherweise findest du diese Einstellung in /etc/nginx/conf.d/my_host.conf:
server {
fastcgi_param PHP_VALUE "memory_limit = 512M";
}
Das einfach in my_host.conf, beim mit nginx.conf am Ende hinzufügen?
cat nextcloud.conf
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name $(hostname);
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
ssl_trusted_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
#ssl_certificate /etc/letsencrypt/rsa-certs/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/rsa-certs/privkey.pem;
#ssl_certificate /etc/letsencrypt/ecc-certs/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/ecc-certs/privkey.pem;
#ssl_trusted_certificate /etc/letsencrypt/ecc-certs/chain.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_protocols TLSv1.3 TLSv1.2;
ssl_ciphers 'TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384';
ssl_ecdh_curve X448:secp521r1:secp384r1;
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
client_max_body_size 5120M;
fastcgi_buffers 64 4K;
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
add_header Permissions-Policy "interest-cohort=()";
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
fastcgi_hide_header X-Powered-By;
fastcgi_read_timeout 3600;
fastcgi_send_timeout 3600;
fastcgi_connect_timeout 3600;
root /var/www/nextcloud;
index index.php index.html /index.php$request_uri;
expires 1m;
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
}
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ^~ /apps/rainloop/app/data {
deny all;
}
location ^~ /.well-known {
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location ^~ /.well-known{ return 301 /index.php/$uri; }
try_files $uri $uri/ =404;
}
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
location ~ \.php(?:$|/) {
rewrite ^/(?!index|test|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
location ~ \.(?:css|js|svg|gif)$ {
try_files $uri /index.php$request_uri;
expires 6M;
access_log off;
}
location ~ \.woff2?$ {
try_files $uri /index.php$request_uri;
expires 7d;
access_log off;
}
location / {
try_files $uri $uri/ /index.php$request_uri;
}
}
Was muss ich wie konkret ändern?
Nanu
February 4, 2022, 5:45pm
4
Für gewöhnlich ändere ich das global. In der etc/php/ Hier Aktuelle PHP Version /cgi/php.ini
memory_limit = 1024M
Abzufragen über
php -i | grep memory_limit
nc-kay
February 6, 2022, 4:34pm
5
Hallo, @Nanu bei mir sieht es anders aus.
Wo genau muss ich die Einstellung global auf 512MB ändern?
Mein System hat
php 7.4
und
php 8.0
nginx Server
Es ist damal mit einem C-Rieger Script installiert worden.
Aus der Nextcloud WebGUI
8.0.15
Arbeitspeicher-Grenzwert: 512 MB
Maximale Ausführungszeit: 3600
Maximale Größe zum Hochladen: 2 MB
Nanu
February 6, 2022, 4:39pm
6
Entweder oder. Beides gibt es nicht
In der Konsole eingeben.
sudo php -v
nc-kay
February 6, 2022, 4:40pm
7
php -i | grep memory_limit
memory_limit => -1 => -1
php -v
PHP 8.0.15 (cli) (built: Jan 29 2022 07:39:13) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.15, Copyright (c) Zend Technologies
with Zend OPcache v8.0.15, Copyright (c), by Zend Technologies
Debian 10 Buster ist die Basis.
Unter /etc/php ist der Ordner “7.4” und “8.0” vorhanden.
Nanu
February 6, 2022, 4:44pm
8
Das ist in
etc/php/8.0/cli/php.ini
unter
memory_limit =>
nc-kay
February 6, 2022, 4:45pm
9
Was mache ich mit dem Ordner “7.4”, wie werde ich den sauber los?
Nanu
February 6, 2022, 4:45pm
10
Brauchste nicht. Was verwendet wird ist wichtig In dein Fall 8.0
nc-kay
February 6, 2022, 4:48pm
11
So sieht der Abschnitt in etc/php/8.0/cli/php.ini aus
; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = -1
Zu ändern in
; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = 512
richtig so?
Woher kommt der Ordner “7.4”?
Nanu
February 6, 2022, 4:52pm
12
Der 7.4 kommt von alten Installationen…
512M
Besser 1024M
nc-kay
February 6, 2022, 4:54pm
13
Der 7.4 kommt von alten Installationen…
Ob ich den Ordner “7.4” einfach so löschen kann ohne später Probleme zu bekommen?
Ich habe nur 1024 MB RAM.
Wenn ich die Änderung wie zuvor beschrieben vornehme, die übersteht das nächst Update von Nextcloud?
Maximale Größe zum Hochladen: 2 MB
Wo ändere ich die maximale Uploadgröße?
Nanu
February 6, 2022, 4:56pm
14
Wenn du den löscht und ihn später eventuell wieder brauchst. Musst du das wieder neu installieren… der brauch nich viel Platz.
Wenn du “nur” 1024M hast wird das alles ein wenig knapp
Dann nimm die Goldene Mitte 768M
speichern und alles neu starten.
sudo service php8.0-fpm restart
Danach wieder mit
php -i | grep memory_limit
abfragen.
1 Like
nc-kay
February 6, 2022, 5:03pm
15
Abschnitt jetzt:
; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = 768
nc-kay
February 6, 2022, 5:05pm
17
; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = 768M
jetzt ja
dann
service php8.0-fpm restart
1 Like
nc-kay
February 6, 2022, 5:07pm
18
Nextcloud GUI
8.0.15
Arbeitspeicher-Grenzwert: 512 MB
Maximale Ausführungszeit: 3600
Maximale Größe zum Hochladen: 2 MB
Muss der Server neu gestartet werden?
Nanu
February 6, 2022, 5:07pm
19
Die Änderst du auch da drin in der php.ini
upload_max_filesize =
Nanu
February 6, 2022, 5:09pm
20
Ja. Würde ich erst nach den ändern der upload größe