Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| dienste:bytecluster0002:cloud [21.02.2021 11:56] – angelegt mape2k | dienste:bytecluster0002:cloud [07.03.2025 23:54] (aktuell) – Update config for Nextcloud mape2k | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Container 'wordpress-technikkultur' ====== | + | ====== Container 'cloud' ====== |
| ===== Ressourcen ===== | ===== Ressourcen ===== | ||
| Zeile 5: | Zeile 5: | ||
| * 2 Cores | * 2 Cores | ||
| * 5 GB HDD (root-fs) | * 5 GB HDD (root-fs) | ||
| - | * 35 GB HDD (data) | + | * 40 GB HDD (/var/www) |
| ===== System ===== | ===== System ===== | ||
| Zeile 16: | Zeile 16: | ||
| * Nextcloud (via NGINX) | * Nextcloud (via NGINX) | ||
| + | |||
| + | ===== Betrieb ===== | ||
| + | ==== Nextcloud aktualisieren (auf der Konsole) ==== | ||
| + | |||
| + | - Updater ausführen | ||
| + | * **sudo -u www-data php / | ||
| + | * Start update? [y/N] **y** | ||
| + | * Should the "occ upgrade" | ||
| + | * Keep maintenance mode active? [y/N] **n** | ||
| + | - In Nextcloud einloggen und unter [[https:// | ||
| + | * Dein Web-Server ist nicht richtig eingerichtet um "/ | ||
| + | * Dein Web-Server ist nicht richtig eingerichtet um "/ | ||
| + | * Es wurde kein PHP-Memory-Cache konfiguriert. | ||
| + | - Angezeigte Fehler prüfen und korrigieren | ||
| + | - Nutzung von OCC: **sudo -u www-data / | ||
| + | |||
| + | ==== Backup | ||
| + | |||
| + | Dateien per Shell sichern | ||
| + | - cd / | ||
| + | - sudo -u www-data php occ maintenance: | ||
| + | - sudo tar -cpzf // | ||
| ===== Installation ===== | ===== Installation ===== | ||
| Zeile 24: | Zeile 46: | ||
| - NGINX und PHP-FPM installieren | - NGINX und PHP-FPM installieren | ||
| - | * **sudo apt-get install | + | * **sudo apt-get install |
| - Default-Konfiguration anpassen< | - Default-Konfiguration anpassen< | ||
| server { | server { | ||
| Zeile 55: | Zeile 77: | ||
| add_header X-Frame-Options | add_header X-Frame-Options | ||
| add_header X-Permitted-Cross-Domain-Policies | add_header X-Permitted-Cross-Domain-Policies | ||
| - | add_header X-Robots-Tag | + | add_header X-Robots-Tag |
| add_header X-XSS-Protection | add_header X-XSS-Protection | ||
| Zeile 91: | Zeile 113: | ||
| try_files $uri $uri/ =404; | try_files $uri $uri/ =404; | ||
| } | } | ||
| - | + | ||
| + | # Add mime tye | ||
| + | types { | ||
| + | application/ | ||
| + | } | ||
| + | |||
| + | # Rule borrowed from `.htaccess` to handle Microsoft DAV clients | ||
| + | location = / { | ||
| + | if ( $http_user_agent ~ ^DavClnt ) { | ||
| + | return 302 / | ||
| + | } | ||
| + | } | ||
| + | |||
| + | location = /robots.txt { | ||
| + | allow all; | ||
| + | log_not_found off; | ||
| + | access_log off; | ||
| + | } | ||
| + | |||
| + | # Make a regex exception for `/ | ||
| + | # access it despite the existence of the regex rule | ||
| + | # `location ~ / | ||
| + | # for `/ | ||
| + | location ^~ / | ||
| + | # The rules in this block are an adaptation of the rules | ||
| + | # in `.htaccess` that concern `/ | ||
| + | |||
| + | location = / | ||
| + | location = / | ||
| + | |||
| + | location / | ||
| + | location / | ||
| + | |||
| + | # Let Nextcloud' | ||
| + | # requests by passing them to the front-end controller. | ||
| + | return 301 / | ||
| + | } | ||
| # Rules borrowed from `.htaccess` to hide certain paths from clients | # Rules borrowed from `.htaccess` to hide certain paths from clients | ||
| location ~ ^/ | location ~ ^/ | ||
| Zeile 114: | Zeile 173: | ||
| fastcgi_param front_controller_active true; # Enable pretty urls | fastcgi_param front_controller_active true; # Enable pretty urls | ||
| # | # | ||
| - | fastcgi_pass unix:/ | + | fastcgi_pass unix:/ |
| fastcgi_intercept_errors on; | fastcgi_intercept_errors on; | ||
| Zeile 138: | Zeile 197: | ||
| } | } | ||
| </ | </ | ||
| - | - PHP-Konfiguration für Upload anpassen< | + | - PHP-Konfiguration für Upload anpassen< |
| ... | ... | ||
| clear_env = no | clear_env = no | ||
| Zeile 149: | Zeile 208: | ||
| ... | ... | ||
| </ | </ | ||
| - | - PHP-Konfiguration für Upload anpassen< | + | - PHP-Konfiguration für Upload anpassen< |
| - | ... | + | |
| - | ; Output buffering is a mechanism for controlling how much output data | + | |
| - | ; (excluding headers and cookies) PHP should keep internally before pushing that | + | |
| - | ; data to the client. If your application' | + | |
| - | ; will send that data in chunks of roughly the size you specify. | + | |
| - | ; Turning on this setting and managing its maximum buffer size can yield some | + | |
| - | ; interesting side-effects depending on your application and web server. | + | |
| - | ; You may be able to send headers and cookies after you've already sent output | + | |
| - | ; through print or echo. You also may see performance benefits if your server is | + | |
| - | ; emitting less packets due to buffered output versus PHP streaming the output | + | |
| - | ; as it gets it. On production servers, 4096 bytes is a good setting for performance | + | |
| - | ; reasons. | + | |
| output_buffering = 0 | output_buffering = 0 | ||
| - | ... | ||
| - | ; Maximum execution time of each script, in seconds | ||
| - | ; http:// | ||
| - | ; Note: This directive is hardcoded to 0 for the CLI SAPI | ||
| max_execution_time = 1800 | max_execution_time = 1800 | ||
| - | ... | ||
| - | ; Maximum amount of time each script may spend parsing request data. It's a good | ||
| - | ; idea to limit this time on productions servers in order to eliminate unexpectedly | ||
| - | ; long running scripts. | ||
| max_input_time = 1800 | max_input_time = 1800 | ||
| - | ... | ||
| - | ; Maximum amount of memory a script may consume (128MB) | ||
| - | ; http:// | ||
| memory_limit = 512M | memory_limit = 512M | ||
| - | ... | ||
| - | ; Temporary directory for HTTP uploaded files (will use system default if not | ||
| - | ; specified). | ||
| - | ; http:// | ||
| upload_tmp_dir = / | upload_tmp_dir = / | ||
| - | ... | ||
| - | ; Maximum size of POST data that PHP will accept. | ||
| - | ; Its value may be 0 to disable the limit. It is ignored if POST data reading | ||
| - | ; is disabled through enable_post_data_reading. | ||
| - | ; http:// | ||
| post_max_size = 512M | post_max_size = 512M | ||
| - | ... | ||
| - | ; Maximum allowed size for uploaded files. | ||
| - | ; http:// | ||
| upload_max_filesize = 512M | upload_max_filesize = 512M | ||
| - | ... | + | opcache.interned_strings_buffer = 128 |
| </ | </ | ||
| - Dienste aktivieren und neustarten | - Dienste aktivieren und neustarten | ||
| - | * **sudo systemctl enable nginx.service | + | * **sudo systemctl enable nginx.service |
| - | * **sudo systemctl restart nginx.service | + | * **sudo systemctl restart nginx.service |
| ==== Nextcloud ==== | ==== Nextcloud ==== | ||
| Zeile 202: | Zeile 226: | ||
| - Nextcloud-Verzeichnisse erstellen | - Nextcloud-Verzeichnisse erstellen | ||
| * **sudo mkdir / | * **sudo mkdir / | ||
| + | - Cronjob einrichten | ||
| + | * **sudo crontab -u www-data -e**< | ||
| + | */5 * * * * php -f / | ||
| + | </ | ||
| Es wurde eine bereits bestehende Installation übernommen. | Es wurde eine bereits bestehende Installation übernommen. | ||
| Zeile 218: | Zeile 246: | ||
| - /root | - /root | ||
| - /var/log | - /var/log | ||
| - | - /var/www | + | - /var/www/data |
| + | - / | ||
| ... | ... | ||
| </ | </ | ||