Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Vorhergehende Überarbeitung | |||
| — | dienste:bytecluster0002:wiki [07.03.2025 20:16] (aktuell) – Update to php8.2 mape2k | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== Container ' | ||
| + | ===== Ressourcen ===== | ||
| + | * 0.5 GB RAM | ||
| + | * 2 Cores | ||
| + | * 16 GB HDD (root-fs) | ||
| + | |||
| + | ===== System ===== | ||
| + | |||
| + | * interne IPs | ||
| + | * 10.2.0.2, fd00: | ||
| + | |||
| + | ===== Dienste ===== | ||
| + | |||
| + | * Dokuwiki (via NGINX) | ||
| + | |||
| + | ===== Installation ===== | ||
| + | |||
| + | * Standard-Template mit Benutzern | ||
| + | |||
| + | ==== NGINX / PHP ==== | ||
| + | |||
| + | - NGINX und PHP-FPM installieren | ||
| + | * **sudo apt-get install php8.2 php8.2-cli php8.2-fpm php8.2-gd php8.2-xml php8.2-zip php8.2-mbstring nginx** | ||
| + | - Default-Konfiguration anpassen< | ||
| + | server { | ||
| + | listen 80 default_server; | ||
| + | listen [::]:80 default_server; | ||
| + | |||
| + | root / | ||
| + | |||
| + | # Add doku.php as index | ||
| + | index doku.php; | ||
| + | |||
| + | server_name _; | ||
| + | |||
| + | # Block Bytespider | ||
| + | if ($http_user_agent ~ (Bytespider|bytedance) ) { | ||
| + | return 403; | ||
| + | } | ||
| + | |||
| + | location / { | ||
| + | try_files $uri $uri/ @dokuwiki; | ||
| + | } | ||
| + | |||
| + | # Do not serve config, data and .ht* | ||
| + | # Comment during installation | ||
| + | location ~ / | ||
| + | return 403; | ||
| + | } | ||
| + | location ~ /\.ht { deny all; } | ||
| + | |||
| + | # Maximum POST-size and Buffer | ||
| + | client_max_body_size 20M; | ||
| + | client_body_buffer_size 128K; | ||
| + | |||
| + | # Rewrite Rules | ||
| + | location @dokuwiki { | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | rewrite ^/(.*) / | ||
| + | } | ||
| + | |||
| + | # pass PHP scripts to FastCGI server | ||
| + | location ~ \.php$ { | ||
| + | try_files $uri =404; | ||
| + | fastcgi_pass unix:/ | ||
| + | fastcgi_index index.php; | ||
| + | include fastcgi_params; | ||
| + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | - Dienste aktivieren und neustarten | ||
| + | * **sudo systemctl enable nginx.service php8.2-fpm.service** | ||
| + | * **sudo systemctl restart nginx.service php8.2-fpm.service** | ||
| + | |||
| + | ==== Dokuwiki ==== | ||
| + | |||
| + | - Dokuwiki-Verzeichnisse erstellen | ||
| + | * **sudo mkdir / | ||
| + | - Dokuwiki installieren | ||
| + | * nach [[https:// | ||
| + | * Entpacken in das Verzeichnis / | ||
| + | * Datenverzeichnis nach / | ||
| + | - Berechtigungen anpassen | ||
| + | * **chown -R www-data: | ||
| + | - Cache-Cleanup einrichten | ||
| + | - Cleanup-Skript< | ||
| + | #!/bin/bash | ||
| + | |||
| + | cleanup() | ||
| + | { | ||
| + | local data_path=" | ||
| + | local retention_days=" | ||
| + | |||
| + | # remove stale lock files (files which are 1-2 days old) | ||
| + | find " | ||
| + | |||
| + | # remove files older than ${retention_days} days from the cache | ||
| + | find " | ||
| + | } | ||
| + | |||
| + | # cleanup DokuWiki installations (path to datadir, number of days) | ||
| + | cleanup / | ||
| + | </ | ||
| + | - Cleanup-Skript ausführbar machen | ||
| + | * **chmod +x / | ||
| + | - Cleanup-Skript als Cronjob einrichten machen | ||
| + | * **< | ||
| + | |||
| + | === robots.txt === | ||
| + | |||
| + | Quelle: https:// | ||
| + | |||
| + | - Robots.txt setzen< | ||
| + | User-agent: CCBot | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: ChatGPT-User | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: GPTBot | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: Google-Extended | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: anthropic-ai | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: Omgilibot | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: Omgili | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: FacebookBot | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: Bytespider | ||
| + | Disallow: / | ||
| + | |||
| + | User-agent: ImagesiftBot | ||
| + | Disallow: / | ||
| + | </ | ||
| + | - Berechtigungen anpassen | ||
| + | * **chown www-data: | ||
| + | |||
| + | ==== Backup mit Borgmatic ==== | ||
| + | |||
| + | - Installation siehe [[mariadb]] | ||
| + | - Konfiguration < | ||
| + | ... | ||
| + | location: | ||
| + | # List of source directories to backup (required). Globs and | ||
| + | # tildes are expanded. | ||
| + | source_directories: | ||
| + | - /etc | ||
| + | - /home | ||
| + | - /root | ||
| + | - /usr/local | ||
| + | - /var/log | ||
| + | - /var/www | ||
| + | ... | ||
| + | </ | ||