| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:dokuwiki [2025/08/05 21:52] – [Prerequisites] Sean Rhone | servers:windows:nginx:dokuwiki [2025/10/10 07:49] (current) – Sean Rhone |
|---|
| ===== Prerequisites ===== | ===== Prerequisites ===== |
| |
| * [[windows:10|Windows 10 (21H2)]] | * [[windows;11_ltsc_server|Windows 11 (24H2)]] |
| * [[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)]] |
| extension = "openssl" | extension = "openssl" |
| extension = "sodium" | extension = "sodium" |
| zend_extension = "opcache" | |
| |
| [Date] | [Date] |
| ; End</code> | ; End</code> |
| |
| <code>"php.exe" -c "%SystemDrive%\www\php\wiki.ini" -m</code> | "php.exe" -c "%SystemDrive%\www\php\wiki.ini" -m |
| |
| ====== nginx + PHP-CGI Configuration ====== | ====== nginx + PHP-CGI Configuration ====== |
| |
| ====== Scripts ====== | ====== Scripts ====== |
| |
| **** | |
| |
| MKDIR "%SystemDrive%\www\scripts\wiki" | MKDIR "%SystemDrive%\www\scripts\wiki" |
| | |
| | "explorer.exe" "%SystemDrive%\www\scripts\wiki" |
| |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| <code> | <code> |
| | @echo off |
| | |
| SET "PHP_FCGI_MAX_REQUESTS=0" | SET "PHP_FCGI_MAX_REQUESTS=0" |
| SET "PHP_FCGI_CHILDREN=1" | SET "PHP_FCGI_CHILDREN=1" |
| @echo off | @echo off |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" reset --hard | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" pull origin "master" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" pull origin "master" --rebase | |
| | |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" gc --aggressive --prune="all" | |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" fsck --full --strict | |
| | |
| "php.exe" "%SystemDrive%\www\wiki\bin\indexer.php" --clear | |
| |
| :: End</code> | :: End</code> |
| |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| * :!: TODO: Might max system drive usage on daily task if not manually managed; NAS probably fine, but test script with NAS disconnected | |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\wiki\Back-up.bat" | "notepad.exe" "%SystemDrive%\www\scripts\wiki\Back-up.bat" |
| "%SystemDrive%\www\scripts\wiki\Back-up.bat" | "%SystemDrive%\www\scripts\wiki\Back-up.bat" |
| |
| ====== Shortcuts ====== | ===== Maintenance ===== |
| |
| ===== Desktop ===== | "notepad.exe" "%SystemDrive%\www\scripts\wiki\Maintenance.bat" |
| |
| ==== Update ==== | <code> |
| | @echo off |
| |
| "%SystemDrive%\www\scripts\wiki\Update.bat" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" reset --hard |
| |
| Wiki Update | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" gc --aggressive --prune="all" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" fsck --full --strict |
| |
| ==== Back-up ==== | "php.exe" "%SystemDrive%\www\wiki\bin\indexer.php" --clear |
| |
| "%SystemDrive%\www\scripts\wiki\Back-up.bat" | :: End</code> |
| |
| Wiki Back-up | "%SystemDrive%\www\scripts\wiki\Maintenance.bat" |
| | |
| | ===== Git Fix ===== |
| | |
| | * :!: Set email for ''user.email'' |
| | |
| | "notepad.exe" "%SystemDrive%\www\scripts\wiki\Git Fix.bat" |
| | |
| | <code> |
| | @echo off |
| | |
| | RMDIR /S /Q "%SystemDrive%\www\wiki\.git" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" init --initial-branch="master" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" add "." |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" config "user.email" "espionage724@x" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" commit --message="x" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" remote add "origin" "https://github.com/dokuwiki/dokuwiki.git" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" pull --depth "1" --recurse-submodules "origin" "master" --rebase |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" reset --hard "origin/master" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" gc --aggressive --prune="all" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\wiki" fsck --full --strict |
| | |
| | PAUSE |
| | |
| | :: End</code> |
| | |
| | "%SystemDrive%\www\scripts\wiki\Git Fix.bat" |
| | |
| | ====== Shortcuts ====== |
| |
| ===== Autostart ===== | ===== Autostart ===== |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| * Time TODO | * Weekly -> Recur every ''1'' weeks on ''Monday'' |
| | * ''12:15:00 AM'' |
| |
| Wiki File Back-up | Wiki File Back-up |
| |
| "%SystemDrive%\www\scripts\wiki\Back-up.bat" | "%SystemDrive%\www\scripts\wiki\Back-up.bat" |
| | |
| | ===== Maintenance ===== |
| | |
| | * Monthly -> All months -> Days: ''1'' |
| | * ''12:30:00 AM'' |
| | |
| | Wiki Maintenance |
| | |
| | "%SystemDrive%\www\scripts\wiki\Maintenance.bat" |
| |
| ====== Initial Setup ====== | ====== Initial Setup ====== |
| "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" |
| |
| ====== Quick Commands ====== | ====== TODOs ====== |
| | |
| | * https://www.dokuwiki.org/plugin:searchindex |
| | * https://www.dokuwiki.org/interwiki |
| |
| ===== Find Orphaned Pages ===== | ===== Find Orphaned Pages ===== |
| |
| "php.exe" "%SystemDrive%\www\wiki\bin\wantedpages.php" --help | "php.exe" "%SystemDrive%\www\wiki\bin\wantedpages.php" --help |
| |
| ===== Scripts ===== | |
| |
| **** | |
| |
| "explorer.exe" "%SystemDrive%\www\scripts\wiki" | |
| |
| ===== Bookmarks ===== | |
| |
| * https://github.com/dokuwiki/dokuwiki/commits/master/ | |
| |
| ====== TODOs ====== | |
| |
| * https://www.dokuwiki.org/plugin:searchindex | |
| * https://www.dokuwiki.org/interwiki | |
| |