| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:dokuwiki [2026/01/16 14:37] – [PHP-CGI] Sean Rhone | servers:windows:nginx:dokuwiki [2026/01/31 01:36] (current) – [TODOs] Sean Rhone |
|---|
| ====== Information ====== | ====== Information ====== |
| |
| * DokuWiki ((https://www.dokuwiki.org)) | * DokuWiki ((https://www.dokuwiki.org/dokuwiki)) |
| * [[Information:Realm of Espionage]] | * [[information;realm_of_espionage|Realm of Espionage]] |
| * https://wiki.realmofespionage.xyz ((you are here :p)) | * https://wiki.realmofespionage.xyz ((you are here :p)) |
| |
| ===== Prerequisites ===== | ===== Prerequisites ===== |
| |
| * [[windows;10|Windows 10 (21H2)]] | * [[windows;10_ltsc_server|Windows 10 (21H2)]] |
| * [[servers;windows;nginx_php_php-cgi|nginx + PHP + PHP-CGI]] | * [[servers;windows;nginx_php_php-cgi|nginx + PHP + PHP-CGI]] |
| * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]] | * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]] |
| "%ProgramFiles%\Git\bin\git.exe" clone --branch "master" --depth "1" --recurse-submodules "https://github.com/splitbrain/dokuwiki.git" "%SystemDrive%\www\wiki" | "%ProgramFiles%\Git\bin\git.exe" clone --branch "master" --depth "1" --recurse-submodules "https://github.com/splitbrain/dokuwiki.git" "%SystemDrive%\www\wiki" |
| |
| ====== Environment ====== | ====== nginx + PHP-CGI Configuration ====== |
| |
| ===== PHP ===== | ===== PHP ===== |
| |
| "php.exe" -c "%SystemDrive%\www\php\wiki.ini" -m | "php.exe" -c "%SystemDrive%\www\php\wiki.ini" -m |
| |
| ====== nginx + PHP-CGI Configuration ====== | |
| |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| * ''D:\Servers\Scheduled Backups'' | |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\wiki\Back-up.bat" | "notepad.exe" "%SystemDrive%\www\scripts\wiki\Back-up.bat" |
| CD "%Temp%" | CD "%Temp%" |
| |
| :: User\Downloads | "tar.exe" -czf "D:\Servers\Scheduled Backups\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf" |
| ::"tar.exe" -czf "%UserProfile%\Downloads\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf" | ::"tar.exe" -czf "%UserProfile%\Downloads\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf" |
| |
| :: NAS | |
| "tar.exe" -czf "D:\Servers\Scheduled Backups\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf" | |
| |
| :: End</code> | :: End</code> |
| ===== Git Fix ===== | ===== Git Fix ===== |
| |
| * :!: Set email for ''user.email'' | * :!: Set ''user.email'' |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\wiki\Git Fix.bat" | "notepad.exe" "%SystemDrive%\www\scripts\wiki\Git Fix.bat" |
| |
| "%SystemDrive%\www\scripts\wiki\Git Fix.bat" | "%SystemDrive%\www\scripts\wiki\Git Fix.bat" |
| |
| ====== Shortcuts ====== | |
| |
| ===== Autostart ===== | |
| |
| ==== PHP-CGI ==== | |
| |
| "explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\StartUp" | |
| |
| "%SystemDrive%\www\scripts\wiki\PHP-CGI.bat" | |
| |
| Wiki PHP-CGI | |
| |
| SCHTASKS /Create /SC "ONLOGON" /TN "Wiki PHP-CGI" /TR "%SystemDrive%\www\scripts\wiki\PHP-CGI.bat" /F | |
| |
| ====== Task Scheduler ====== | |
| |
| **** | |
| |
| taskschd.msc | |
| |
| ===== Update ===== | |
| |
| * ''12:00:00 AM'' daily | |
| |
| Wiki Update | |
| |
| "%SystemDrive%\www\scripts\wiki\Update.bat" | |
| |
| SCHTASKS /Create /SC "ONCE" /TN "Wiki Update" /TR "%SystemDrive%\www\scripts\wiki\Update.bat" /ST "00:00" /F | |
| |
| ===== Back-up ===== | |
| |
| * Weekly -> Recur every ''1'' weeks on ''Monday'' | |
| * ''12:15:00 AM'' | |
| |
| Wiki File Back-up | |
| |
| "%SystemDrive%\www\scripts\wiki\Back-up.bat" | |
| |
| SCHTASKS /Create /SC "WEEKLY" /D "MON" /TN "Wiki Update" /TR "%SystemDrive%\www\scripts\wiki\Update.bat" /ST "00:15" /F | |
| |
| ===== Maintenance ===== | |
| |
| * Monthly -> All months -> Days: ''1'' | |
| * ''12:30:00 AM'' | |
| |
| Wiki Maintenance | |
| |
| "%SystemDrive%\www\scripts\wiki\Maintenance.bat" | |
| |
| SCHTASKS /Create /SC "MONTHLY" /D "1" /M "*" /TN "Wiki Maintenance" /TR "%SystemDrive%\www\scripts\wiki\Maintenance.bat" /ST "00:30" /F | |
| |
| ====== Initial Setup ====== | ====== Initial Setup ====== |
| "%SystemDrive%\www\scripts\nginx\Reload.bat" | "%SystemDrive%\www\scripts\nginx\Reload.bat" |
| |
| ===== Admin ===== | ===== Configuration Manager ===== |
| |
| * DokuWiki -> Advanced -> ''userewrite'': ''.htaccess'' | * ''userewrite'': ''.htaccess'' |
| * Links -> ''target»extern'': ''_tab'' | * ''target»extern'': ''_tab'' |
| |
| ==== Template Style Settings ==== | ===== Template Style ===== |
| |
| * Alternative background color: ''#484848'' (dark gray) | * Alternative background color: ''#484848'' (dark gray) |
| ===== Double-hyphen Convert Disable ===== | ===== Double-hyphen Convert Disable ===== |
| |
| * This prevents -- from becoming a – (long hyphen) which breaks some command's syntax | * https://www.dokuwiki.org/entities |
| | * This prevents ''--'' from becoming a ''—'' (long hyphen/em dash) which breaks some command syntax |
| |
| "notepad.exe" "%SystemDrive%\www\wiki\conf\entities.local.conf" | ECHO -- -- > "%SystemDrive%\www\wiki\conf\entities.local.conf" |
| |
| <code>-- --</code> | ====== Task Scheduler ====== |
| | |
| | ===== PHP-CGI ===== |
| | |
| | * Auto-start |
| | |
| | SCHTASKS /Create /SC "ONLOGON" /TN "Wiki PHP-CGI" /TR "%SystemDrive%\www\scripts\wiki\PHP-CGI.bat" /F |
| | |
| | ===== Update ===== |
| | |
| | * Daily ''12:00:00 AM'' |
| | |
| | SCHTASKS /Create /SC "DAILY" /TN "Wiki Update" /TR "%SystemDrive%\www\scripts\wiki\Update.bat" /ST "00:00" /F |
| | |
| | ===== Back-up ===== |
| | |
| | * Weekly (Monday) ''12:10:00 AM'' |
| | |
| | SCHTASKS /Create /SC "WEEKLY" /D "MON" /TN "Wiki File Back-up" /TR "%SystemDrive%\www\scripts\wiki\Back-up.bat" /ST "00:10" /F |
| | |
| | ===== Maintenance ===== |
| | |
| | * Monthly (1st) ''12:30:00 AM'' |
| | |
| | SCHTASKS /Create /SC "MONTHLY" /D "1" /M "*" /TN "Wiki Maintenance" /TR "%SystemDrive%\www\scripts\wiki\Maintenance.bat" /ST "00:30" /F |
| |
| ====== Files ====== | ====== Backup ====== |
| |
| ===== Backup ===== | ===== Folder ===== |
| |
| **** | **** |
| "tar.exe" -czf "%UserProfile%\Downloads\dokuwiki-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf" | "tar.exe" -czf "%UserProfile%\Downloads\dokuwiki-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf" |
| |
| ====== TODOs ====== | ====== TODO ====== |
| |
| * https://www.dokuwiki.org/plugin:searchindex | |
| * https://www.dokuwiki.org/interwiki | * https://www.dokuwiki.org/interwiki |
| |