| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:dokuwiki [2026/01/17 05:15] – Sean Rhone | servers:windows:nginx:dokuwiki [2026/05/13 10:35] (current) – [Prerequisites] 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;freenginx_php_php-cgi|freenginx + PHP + PHP-CGI]] |
| * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]] | * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]] |
| * [[programs;windows;git|Git]] | * [[programs;windows;git|Git]] |
| "%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 ===== |
| |
| "notepad.exe" "%SystemDrive%\www\php\wiki.ini" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\php\wiki.ini" |
| |
| <code> | <code> |
| |
| "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 ===== |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\default.d\wiki.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\default.d\wiki.conf" |
| |
| <code> | <code> |
| ===== Server Block ===== | ===== Server Block ===== |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\wiki.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\wiki.conf" |
| |
| <code> | <code> |
| MKDIR "%SystemDrive%\www\scripts\wiki" | MKDIR "%SystemDrive%\www\scripts\wiki" |
| |
| "explorer.exe" "%SystemDrive%\www\scripts\wiki" | "%SystemRoot%\explorer.exe" "%SystemDrive%\www\scripts\wiki" |
| |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\wiki\PHP-CGI.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\wiki\PHP-CGI.bat" |
| |
| <code> | <code> |
| SET "PHP_FCGI_CHILDREN=1" | SET "PHP_FCGI_CHILDREN=1" |
| |
| START "Wiki PHP-CGI" /MIN "php-cgi.exe" -b "127.0.0.1:9002" -c "%SystemDrive%\www\php\wiki.ini" -q | START "Wiki PHP-CGI" /MIN /D "%Temp%" "php-cgi.exe" -b "127.0.0.1:9002" -c "%SystemDrive%\www\php\wiki.ini" -q |
| |
| SET "PHP_FCGI_MAX_REQUESTS=" | SET "PHP_FCGI_MAX_REQUESTS=" |
| ===== Update ===== | ===== Update ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\wiki\Update.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\wiki\Update.bat" |
| |
| <code> | <code> |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| * ''D:\Servers\Scheduled Backups'' | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\wiki\Back-up.bat" |
| | |
| "notepad.exe" "%SystemDrive%\www\scripts\wiki\Back-up.bat" | |
| |
| <code> | <code> |
| CD "%Temp%" | CD "%Temp%" |
| |
| :: User\Downloads | "%SystemRoot%\System32\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" | |
| |
| :: NAS | ::"%SystemRoot%\System32\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 "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> |
| ===== Maintenance ===== | ===== Maintenance ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\wiki\Maintenance.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\wiki\Maintenance.bat" |
| |
| <code> | <code> |
| ===== Git Fix ===== | ===== Git Fix ===== |
| |
| * :!: Set email for ''user.email'' | * :!: Set ''user.email'' |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\wiki\Git Fix.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\wiki\Git Fix.bat" |
| |
| <code> | <code> |
| |
| "%SystemDrive%\www\scripts\wiki\Git Fix.bat" | "%SystemDrive%\www\scripts\wiki\Git Fix.bat" |
| |
| ====== 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 "ONCE" /TN "Wiki Update" /TR "%SystemDrive%\www\scripts\wiki\Update.bat" /ST "00:00" /F | |
| |
| ===== Back-up ===== | |
| |
| * Weekly (Monday) ''12:15:00 AM'' | |
| |
| SCHTASKS /Create /SC "WEEKLY" /D "MON" /TN "Wiki Update" /TR "%SystemDrive%\www\scripts\wiki\Update.bat" /ST "00:15" /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 | |
| |
| ====== Initial Setup ====== | ====== Initial Setup ====== |
| * Do after initial setup and check warning in Admin panel | * Do after initial setup and check warning in Admin panel |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\wiki.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\wiki.conf" |
| |
| "%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" |
| | |
| | ====== Task Scheduler ====== |
| | |
| | ===== PHP-CGI ===== |
| | |
| | * Auto-start |
| | |
| | "%SystemRoot%\System32\schtasks.exe" /Create /SC "ONLOGON" /TN "Wiki PHP-CGI" /TR "%SystemDrive%\www\scripts\wiki\PHP-CGI.bat" /F |
| | |
| | ===== Update ===== |
| | |
| | * Daily ''12:00:00 AM'' |
| | |
| | "%SystemRoot%\System32\schtasks.exe" /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'' |
| | |
| | "%SystemRoot%\System32\schtasks.exe" /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'' |
| |
| <code>-- --</code> | "%SystemRoot%\System32\schtasks.exe" /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" | "%SystemRoot%\System32\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 |
| |