| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:piwigo [2025/08/31 08:56] – [PHP] Sean Rhone | servers:windows:nginx:piwigo [2025/10/10 07:33] (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)]] |
| * [[programs;windows;git|Git]] | * [[programs;windows;git|Git]] |
| * [[servers;windows;mariadb|MariaDB]] | * [[servers;windows;mariadb|MariaDB]] |
| |
| ===== TODOs ===== | |
| |
| * Show title on pictures (long titles get cut-off in navbar) | |
| * AI ([[https://piwigo.org/forum/viewtopic.php?pid=192438#p192438|post]], [[https://github.com/Piwigo/Piwigo/commits/master/include/config_default.inc.php|config.inc.php]]) | |
| |
| ====== Dependencies ====== | ====== Dependencies ====== |
| |
| * https://piwigo.org/guides/install/requirements | * https://piwigo.org/guides/install/requirements |
| | * https://github.com/Piwigo/piwigo-videojs/wiki/How-to-add-videos |
| | * https://github.com/Piwigo/piwigo-videojs/wiki/Synchronize#requirement |
| |
| ====== Download Source ====== | ====== Download Source ====== |
| # access_log logs/media-access.log; | # access_log logs/media-access.log; |
| # error_log logs/media-error.log; | # error_log logs/media-error.log; |
| |
| # Install dir post-install block | |
| # | |
| # location "/install" { | |
| # location ~* \.(php)$ { | |
| # deny "all"; | |
| # } | |
| # } | |
| |
| location / { | location / { |
| |
| ===== Folder ===== | ===== Folder ===== |
| |
| **** | |
| |
| MKDIR "%SystemDrive%\www\scripts\media" | MKDIR "%SystemDrive%\www\scripts\media" |
| | |
| | "explorer.exe" "%SystemDrive%\www\scripts\media" |
| |
| ===== 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" |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\media\Update.bat" | "notepad.exe" "%SystemDrive%\www\scripts\media\Update.bat" |
| | |
| | <code> |
| | @echo off |
| | |
| | :: Piwigo |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" pull origin "master" |
| | |
| | :: Bootstrap Darkroom |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" pull origin "master" |
| | |
| | :: End</code> |
| | |
| | "%SystemDrive%\www\scripts\media\Update.bat" |
| | |
| | ===== Back-up ===== |
| | |
| | * TODO |
| | |
| | "notepad.exe" "%SystemDrive%\www\scripts\media\Back-up.bat" |
| | |
| | <code> |
| | @echo off |
| | |
| | :: User\Downloads |
| | "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> |
| | |
| | "%SystemDrive%\www\scripts\media\Back-up.bat" |
| | |
| | ===== Maintenance ===== |
| | |
| | "notepad.exe" "%SystemDrive%\www\scripts\media\Maintenance.bat" |
| |
| <code> | <code> |
| :: Piwigo | :: Piwigo |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" reset --hard | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" reset --hard |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" pull origin "master" --rebase | |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" gc --aggressive --prune="all" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" gc --aggressive --prune="all" |
| :: Bootstrap Darkroom | :: Bootstrap Darkroom |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" reset --hard | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" reset --hard |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" pull origin "master" --rebase | |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" gc --aggressive --prune="all" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" gc --aggressive --prune="all" |
| :: End</code> | :: End</code> |
| |
| "%SystemDrive%\www\scripts\media\Update.bat" | "%SystemDrive%\www\scripts\media\Maintenance.bat" |
| |
| ====== Shortcuts ====== | ===== Git Fix ===== |
| |
| ===== Desktop ===== | * :!: Set email for both ''user.email'' |
| |
| ==== Update ==== | "notepad.exe" "%SystemDrive%\www\scripts\media\Git Fix.bat" |
| |
| "%SystemDrive%\www\scripts\media\Update.bat" | <code> |
| | @echo off |
| |
| Media Update | :: Piwigo |
| | RMDIR /S /Q "%SystemDrive%\www\media\.git" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" init --initial-branch="master" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" add "." |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" config "user.email" "espionage724@x" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" commit --message="x" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" remote add "origin" "https://github.com/Piwigo/Piwigo.git" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" pull --depth "1" --recurse-submodules "origin" "master" --rebase |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" reset --hard "origin/master" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" gc --aggressive --prune="all" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" fsck --full --strict |
| | |
| | :: Bootstrap Darkroom |
| | RMDIR /S /Q "%SystemDrive%\www\media\themes\bootstrap_darkroom\.git" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" init --initial-branch="master" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" add "." |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" config "user.email" "espionage724@x" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" commit --message="x" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" remote add "origin" "https://github.com/Piwigo/piwigo-bootstrap-darkroom.git" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" pull --depth "1" --recurse-submodules "origin" "master" --rebase |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" reset --hard "origin/master" |
| | |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" gc --aggressive --prune="all" |
| | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" fsck --full --strict |
| | |
| | PAUSE |
| | |
| | :: End</code> |
| | |
| | "%SystemDrive%\www\scripts\media\Git Fix.bat" |
| | |
| | ====== Shortcuts ====== |
| |
| ===== Autostart ===== | ===== Autostart ===== |
| |
| "%SystemDrive%\www\scripts\media\Update.bat" | "%SystemDrive%\www\scripts\media\Update.bat" |
| | |
| | ===== Back-up ===== |
| | |
| | * Weekly -> Recur every ''1'' weeks on ''Monday'' |
| | * ''12:15:00 AM'' |
| | |
| | Wiki File Back-up |
| | |
| | "%SystemDrive%\www\scripts\media\Back-up.bat" |
| | |
| | ===== Maintenance ===== |
| | |
| | * Monthly -> All months -> Days: ''1'' |
| | * ''12:30:00 AM'' |
| | |
| | Wiki Maintenance |
| | |
| | "%SystemDrive%\www\scripts\media\Maintenance.bat" |
| |
| ====== Initial Setup ====== | ====== Initial Setup ====== |
| "%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "piwigo" < "%UserProfile%\Downloads\piwigo.sql" | "%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "piwigo" < "%UserProfile%\Downloads\piwigo.sql" |
| |
| ====== Quick Commands ====== | ====== TODOs ====== |
| |
| ===== Scripts ===== | * Show title on pictures (long titles get cut-off in navbar) |
| | * AI ([[https://piwigo.org/forum/viewtopic.php?pid=192438#p192438|post]], [[https://github.com/Piwigo/Piwigo/commits/master/include/config_default.inc.php|config.inc.php]]) |
| **** | |
| | |
| "explorer.exe" "%SystemDrive%\www\scripts\media" | |
| | |
| ===== Bookmarks ===== | |
| | |
| * https://github.com/Piwigo/Piwigo/commits/master/ | |
| * https://github.com/Piwigo/piwigo-bootstrap-darkroom/commits/master/ | |
| |