Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| edv:woody:dokuwiki [11 03 2025 15 : 03] – angelegt André Reichert-Creutz | edv:woody:dokuwiki [15 14 2025 20 : 14] (aktuell) – André Reichert-Creutz | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ======DokuWiki====== | ======DokuWiki====== | ||
| + | ====== Installation von DokuWiki unter DietPi mit lighttpd und HTTPS ====== | ||
| - | =====Plugin sidebar===== | + | Diese Anleitung beschreibt die minimalistische und optimierte Installation von DokuWiki auf einem DietPi-System. |
| - | Die neue action.php: Keife störende Sidebar in Admin und Edit | + | Als Webserver wird ''' |
| + | Die Absicherung der Verbindung erfolgt über HTTPS mit einem kostenlosen Let's Encrypt Zertifikat. | ||
| + | |||
| + | ===== Voraussetzungen | ||
| + | * Ein laufendes DietPi-System | ||
| + | * ''' | ||
| + | * Root- oder sudo-Zugriff auf die Konsole | ||
| + | * Eine aktive Internetverbindung | ||
| + | * Ein Domainname, der auf die IP-Adresse des Servers zeigt: | ||
| + | < | ||
| + | |||
| + | ===== 1. PHP und benötigte Erweiterungen installieren ===== | ||
| + | |||
| + | <code bash> | ||
| + | dietpi-software install 89 | ||
| + | apt update | ||
| + | apt install | ||
| + | </ | ||
| + | |||
| + | ===== 2. PHP-FPM in lighttpd aktivieren ===== | ||
| + | |||
| + | <code bash> | ||
| + | lighttpd-enable-mod fastcgi | ||
| + | lighttpd-enable-mod fastcgi-php-fpm | ||
| + | systemctl restart php8.2-fpm | ||
| + | systemctl restart lighttpd | ||
| + | </ | ||
| + | |||
| + | ===== 3. DokuWiki herunterladen und installieren ===== | ||
| + | |||
| + | <code bash> | ||
| + | cd /tmp | ||
| + | wget https:// | ||
| + | tar xvf dokuwiki-stable.tgz | ||
| + | mv dokuwiki-*/ / | ||
| + | chown -R www-data: | ||
| + | chmod -R 755 / | ||
| + | </ | ||
| + | |||
| + | ===== 4. Angepasste lighttpd-Konfiguration ===== | ||
| + | |||
| + | Bearbeiten der Datei **/ | ||
| + | |||
| + | < | ||
| + | server.modules = ( | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ) | ||
| + | |||
| + | server.document-root = "/ | ||
| + | server.upload-dirs | ||
| + | server.errorlog | ||
| + | server.pid-file | ||
| + | server.username | ||
| + | server.groupname | ||
| + | server.port | ||
| + | |||
| + | index-file.names = ( " | ||
| + | url.access-deny = ( " | ||
| + | static-file.exclude-extensions = ( " | ||
| + | |||
| + | $HTTP[" | ||
| + | url.access-deny = ("" | ||
| + | } | ||
| + | url.rewrite-if-not-file = ( | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ) | ||
| + | |||
| + | fastcgi.server = ( | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ) | ||
| + | ) | ||
| + | ) | ||
| + | |||
| + | $SERVER[" | ||
| + | url.redirect = ( | ||
| + | "" | ||
| + | ) | ||
| + | } | ||
| + | |||
| + | $SERVER[" | ||
| + | ssl.engine | ||
| + | ssl.pemfile = "/ | ||
| + | ssl.privkey = "/ | ||
| + | ssl.ca-file = "/ | ||
| + | |||
| + | ssl.use-sslv3 = " | ||
| + | ssl.honor-cipher-order = " | ||
| + | ssl.cipher-list = " | ||
| + | } | ||
| + | |||
| + | server.feature-flags += (" | ||
| + | server.feature-flags += (" | ||
| + | setenv.add-response-header = ( | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ) | ||
| + | </ | ||
| + | |||
| + | ===== 5. HTTPS mit Let's Encrypt einrichten ===== | ||
| + | |||
| + | <code bash> | ||
| + | dietpi-letsencrypt | ||
| + | </ | ||
| + | |||
| + | Gib als Domain **creutz.spdns.de** an und folge den Anweisungen. | ||
| + | Nach Abschluss ist HTTPS automatisch aktiv. | ||
| + | |||
| + | ===== 6. DokuWiki im Browser einrichten ===== | ||
| + | |||
| + | Öffne im Browser: | ||
| + | < | ||
| + | https:// | ||
| + | </ | ||
| + | |||
| + | Fülle die Felder aus, lege den Admin-Account an und bestätige. | ||
| + | |||
| + | ===== 7. Installation absichern ===== | ||
| + | |||
| + | <code bash> | ||
| + | mv / | ||
| + | </ | ||
| + | |||
| + | ===== Ergebnis ===== | ||
| + | |||
| + | * ✅ DokuWiki läuft unter lighttpd auf DietPi | ||
| + | * ✅ Zugriff unter **https:// | ||
| + | * ✅ Keine Datenbank nötig | ||
| + | * ✅ Ressourcenschonend und abgesichert | ||
| + | |||
| + | ====== Rechte nach Updates automatisch wiederherstellen ===== | ||
| + | nano / | ||
| + | <code bash> | ||
| + | # | ||
| + | DOCU_PATH="/ | ||
| + | |||
| + | chown -R www-data: | ||
| + | find " | ||
| + | find " | ||
| + | |||
| + | find " | ||
| + | find " | ||
| + | find " | ||
| + | find " | ||
| + | find " | ||
| + | find " | ||
| + | </ | ||
| + | Danach ausführen: <code bash> | ||
| + | |||
| + | ---- | ||
| + | ====== Plugins ====== | ||
| + | =====Plugin sidebar: Keine störende Sidebar in Admin und Edit ===== | ||
| + | Die neue action.php: | ||
| <code php> | <code php> | ||
| <?php | <?php | ||
| Zeile 138: | Zeile 304: | ||
| $ACT = $saveACT; | $ACT = $saveACT; | ||
| } | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Sidebar positionieren ==== | ||
| + | die neue style.css: | ||
| + | <code css> | ||
| + | /** | ||
| + | * Extra styles for sidebar template | ||
| + | * | ||
| + | * @author Christopher Smith < | ||
| + | */ | ||
| + | |||
| + | /* dokuwiki containers & styles */ | ||
| + | |||
| + | /* sidebar orientation and position */ | ||
| + | #sidebar { | ||
| + | width:8%; | ||
| + | margin:0; | ||
| + | padding:0; | ||
| + | position: relative; | ||
| + | } | ||
| + | |||
| + | #sidebartop { | ||
| + | position: absolute; | ||
| + | top: -17em; | ||
| + | width: 100%; | ||
| + | height: 1.2em; | ||
| + | background: __background_neu__; | ||
| + | } | ||
| + | |||
| + | .sidebar_inside_left #sidebar { | ||
| + | float:left; | ||
| + | } | ||
| + | |||
| + | .sidebar_inside_right #sidebar { | ||
| + | float: | ||
| + | } | ||
| + | |||
| + | .sidebar_inside_left .dokuwiki div.breadcrumbs { | ||
| + | float: right; | ||
| + | width: 78%; | ||
| + | padding: 0 1% 0 0.9%; | ||
| + | } | ||
| + | |||
| + | .sidebar_inside_left .dokuwiki .page, .sidebar_inside_left .dokuwiki .meta { | ||
| + | float: | ||
| + | width: | ||
| + | margin-right: | ||
| + | margin-left: | ||
| + | } | ||
| + | |||
| + | .sidebar_inside_right .dokuwiki .page, .sidebar_inside_right .dokuwiki .meta, .sidebar_inside_right .dokuwiki div.breadcrumbs { | ||
| + | float:left; | ||
| + | width:77%; | ||
| + | margin-left: | ||
| + | margin-right: | ||
| + | } | ||
| + | |||
| + | .sidebar_outside_left #sidebar { | ||
| + | position: | ||
| + | top:11em; | ||
| + | left:30em; | ||
| + | } | ||
| + | |||
| + | .sidebar_outside_right #sidebar { | ||
| + | position: | ||
| + | top:0; | ||
| + | right:0; | ||
| + | } | ||
| + | |||
| + | .sidebar_outside_left .dokuwiki { | ||
| + | padding-left: | ||
| + | } | ||
| + | |||
| + | .sidebar_outside_right .dokuwiki { | ||
| + | padding-right: | ||
| + | } | ||
| + | |||
| + | .sidebar_outside_left .footerinc { | ||
| + | padding-left: | ||
| + | } | ||
| + | |||
| + | .sidebar_outside_right .footerinc { | ||
| + | padding-right: | ||
| + | } | ||
| + | |||
| + | /* sidebar presentation */ | ||
| + | /* the following three styles use a faux-column image to place a separating line | ||
| + | | ||
| + | .sidebar_outside_left .dokuwiki, .sidebar_inside_left .dokuwiki { | ||
| + | background: url(images/ | ||
| + | } | ||
| + | |||
| + | .sidebar_outside_right .dokuwiki, .sidebar_inside_right .dokuwiki { | ||
| + | background: url(images/ | ||
| + | } | ||
| + | |||
| + | /* hide the line where it passes through .stylehead */ | ||
| + | .stylehead { | ||
| + | background: __background__; | ||
| + | } | ||
| + | |||
| + | /* sidebar contents */ | ||
| + | #sidebar { | ||
| + | font-size: | ||
| + | } | ||
| + | |||
| + | #sidebar a { | ||
| + | color: __existing__; | ||
| + | } | ||
| + | |||
| + | #sidebar a.wikilink2 { | ||
| + | color: __text_neu__; | ||
| + | } | ||
| + | |||
| + | #sidebar a.wikilink2: | ||
| + | text-decoration: | ||
| + | cursor: | ||
| + | } | ||
| + | |||
| + | #sidebar h1 { | ||
| + | font-size: | ||
| + | margin-left: | ||
| + | padding-left: | ||
| + | font-weight: | ||
| + | padding-bottom: | ||
| + | background-color: | ||
| + | } | ||
| + | #sidebar h2 { | ||
| + | font-size: | ||
| + | margin-left: | ||
| + | font-weight: | ||
| + | padding-bottom: | ||
| + | } | ||
| + | #sidebar h3 { | ||
| + | font-size: | ||
| + | margin-left: | ||
| + | font-weight: | ||
| + | padding-bottom: | ||
| + | } | ||
| + | #sidebar h4 { | ||
| + | font-size: | ||
| + | margin-left: | ||
| + | font-weight: | ||
| + | padding-bottom: | ||
| + | } | ||
| + | #sidebar h5 { | ||
| + | font-size: | ||
| + | margin-left: | ||
| + | font-weight: | ||
| + | padding-bottom: | ||
| + | } | ||
| + | #sidebar .toc { | ||
| + | display: | ||
| + | } | ||
| + | |||
| + | #sidebar .secedit { | ||
| + | } | ||
| + | |||
| + | /* reduced section indentation */ | ||
| + | #sidebar div.level1 {margin-left: | ||
| + | #sidebar div.level2 {margin-left: | ||
| + | #sidebar div.level3 {margin-left: | ||
| + | #sidebar div.level4 {margin-left: | ||
| + | #sidebar div.level5 {margin-left: | ||
| + | |||
| + | /* IE fixes (hide from IE Mac) \*/ | ||
| + | |||
| + | * html .page .toc {height: | ||
| + | * html pre {width: | ||
| + | * html .stylehead {height: | ||
| + | |||
| + | * html .sidebar_inside_left .page, * html .sidebar_inside_right .page, | ||
| + | * html .sidebar_inside_left .meta, * html .sidebar_inside_right .meta { | ||
| + | width: 77%; /* IE needs extra gap to ensure #sidebar & .page float next to each other \*/ | ||
| + | overflow-x: auto; /* IE proprietary property to prevent wide images in wiki page forcing sidebar down below wiki page \*/ | ||
| + | /* ' | ||
| + | } | ||
| + | |||
| + | /* (end IE Mac hiding) */ | ||
| + | |||
| + | /* duplicate standard DW styles with increased specificity to counter some sidebar styles */ | ||
| + | .sidebar_outside_left .insitu-footnote, | ||
| + | background-color: | ||
| + | } | ||
| + | /* counteract some inappropriate DW styling */ | ||
| + | .sidebar div.dokuwiki # | ||
| + | margin-bottom: | ||
| + | } | ||
| + | .sidebar div.dokuwiki p.license { | ||
| + | background-color: | ||
| + | padding-top: | ||
| } | } | ||
| </ | </ | ||
