| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:piwigo [2026/02/01 20:39] – [TODOs] Sean Rhone | servers:windows:nginx:piwigo [2026/04/15 10:05] (current) – [PHP-CGI] Sean Rhone |
|---|
| ====== Database ====== | ====== Database ====== |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" |
| |
| CREATE DATABASE piwigo; | CREATE DATABASE piwigo; |
| ===== PHP ===== | ===== PHP ===== |
| |
| "notepad.exe" "%SystemDrive%\www\php\media.ini" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\php\media.ini" |
| |
| <code> | <code> |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\default.d\media.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\default.d\media.conf" |
| |
| <code> | <code> |
| ===== Server Block ===== | ===== Server Block ===== |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\media.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\media.conf" |
| |
| <code> | <code> |
| MKDIR "%SystemDrive%\www\scripts\media" | MKDIR "%SystemDrive%\www\scripts\media" |
| |
| "explorer.exe" "%SystemDrive%\www\scripts\media" | "%SystemRoot%\explorer.exe" "%SystemDrive%\www\scripts\media" |
| |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\media\PHP-CGI.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\media\PHP-CGI.bat" |
| |
| <code> | <code> |
| SET "PHP_FCGI_CHILDREN=1" | SET "PHP_FCGI_CHILDREN=1" |
| |
| START "Media PHP-CGI" /MIN "php-cgi.exe" -b "127.0.0.1:9003" -c "%SystemDrive%\www\php\media.ini" -q | START "Media PHP-CGI" /MIN /D "%Temp%" "php-cgi.exe" -b "127.0.0.1:9003" -c "%SystemDrive%\www\php\media.ini" -q |
| |
| SET "PHP_FCGI_MAX_REQUESTS=" | SET "PHP_FCGI_MAX_REQUESTS=" |
| ===== Update ===== | ===== Update ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\media\Update.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\media\Update.bat" |
| |
| <code> | <code> |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\media\Back-up.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\media\Back-up.bat" |
| |
| <code> | <code> |
| CD "%Temp%" | CD "%Temp%" |
| |
| "tar.exe" -czf "D:\Servers\Scheduled Backups\piwigo-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" | "%SystemRoot%\System32\tar.exe" -czf "D:\Servers\Scheduled Backups\piwigo-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "D:\Servers\Scheduled Backups\%RANDOM%-piwigo.sql" "piwigo" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "D:\Servers\Scheduled Backups\%RANDOM%-piwigo.sql" "piwigo" |
| |
| ::"tar.exe" -czf "%UserProfile%\Downloads\piwigo-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" | ::"%SystemRoot%\System32\tar.exe" -czf "%UserProfile%\Downloads\piwigo-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" |
| ::"%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "%UserProfile%\Downloads\%RANDOM%-piwigo.sql" "piwigo" | ::"%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "%UserProfile%\Downloads\%RANDOM%-piwigo.sql" "piwigo" |
| |
| :: End</code> | :: End</code> |
| ===== Maintenance ===== | ===== Maintenance ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\media\Maintenance.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\media\Maintenance.bat" |
| |
| <code> | <code> |
| * :!: Set **both** ''user.email'' | * :!: Set **both** ''user.email'' |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\media\Git Fix.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\media\Git Fix.bat" |
| |
| <code> | <code> |
| * Auto-start | * Auto-start |
| |
| SCHTASKS /Create /SC "ONLOGON" /TN "Media PHP-CGI" /TR "%SystemDrive%\www\scripts\media\PHP-CGI.bat" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "ONLOGON" /TN "Media PHP-CGI" /TR "%SystemDrive%\www\scripts\media\PHP-CGI.bat" /F |
| |
| ===== Update ===== | ===== Update ===== |
| * Daily ''01:00:00 AM'' | * Daily ''01:00:00 AM'' |
| |
| SCHTASKS /Create /SC "DAILY" /TN "Media Update" /TR "%SystemDrive%\www\scripts\media\Update.bat" /ST "01:00" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "DAILY" /TN "Media Update" /TR "%SystemDrive%\www\scripts\media\Update.bat" /ST "01:00" /F |
| |
| ===== Back-up ===== | ===== Back-up ===== |
| * Monthly (2nd) ''01:10:00 AM'' | * Monthly (2nd) ''01:10:00 AM'' |
| |
| SCHTASKS /Create /SC "MONTHLY" /D "2" /M "*" /TN "Media Back-up" /TR "%SystemDrive%\www\scripts\media\Back-up.bat" /ST "01:10" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "MONTHLY" /D "2" /M "*" /TN "Media Back-up" /TR "%SystemDrive%\www\scripts\media\Back-up.bat" /ST "01:10" /F |
| |
| ===== Maintenance ===== | ===== Maintenance ===== |
| * Monthly (2nd) ''01:30:00 AM'' | * Monthly (2nd) ''01:30:00 AM'' |
| |
| SCHTASKS /Create /SC "MONTHLY" /D "2" /M "*" /TN "Media Maintenance" /TR "%SystemDrive%\www\scripts\media\Maintenance.bat" /ST "01:30" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "MONTHLY" /D "2" /M "*" /TN "Media Maintenance" /TR "%SystemDrive%\www\scripts\media\Maintenance.bat" /ST "01:30" /F |
| |
| ====== Initial Setup ====== | ====== Initial Setup ====== |
| * [[https://github.com/Piwigo/Piwigo/blob/master/include/config_default.inc.php|More Settings]] | * [[https://github.com/Piwigo/Piwigo/blob/master/include/config_default.inc.php|More Settings]] |
| |
| "notepad.exe" "%SystemDrive%\www\media\local\config\config.inc.php" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\media\local\config\config.inc.php" |
| |
| <code> | <code> |
| $conf['links'] = array( | $conf['links'] = array( |
| 'https://realmofespionage.xyz' => 'Realm of Espionage', | 'https://realmofespionage.xyz' => 'Realm of Espionage', |
| 'https://wiki.realmofespionage.xyz/start' => 'RoE | Wiki', | 'https://wiki.realmofespionage.xyz' => 'RoE | Wiki', |
| 'https://blog.realmofespionage.xyz/' => 'RoE | Blog', | 'https://blog.realmofespionage.xyz' => 'RoE | Blog', |
| 'https://social.realmofespionage.xyz/profile/espionage724' => 'RoE | Social', | 'https://social.realmofespionage.xyz/profile/espionage724' => 'RoE | Social', |
| 'https://forums.realmofespionage.xyz/' => 'RoE | Forums', | 'https://forums.realmofespionage.xyz' => 'RoE | Forums', |
| 'https://status.realmofespionage.xyz/' => 'RoE | Status', | 'https://status.realmofespionage.xyz' => 'RoE | Status', |
| 'https://wiki.realmofespionage.xyz/user;espionage724' => 'Webmaster Info', | 'https://wiki.realmofespionage.xyz/user;espionage724' => 'Webmaster Info', |
| 'https://wiki.realmofespionage.xyz/servers;windows;nginx;piwigo' => 'Instance Configuration Notes', | 'https://wiki.realmofespionage.xyz/servers;windows;nginx;piwigo' => 'Instance Configuration Notes', |
| * :!: Change ''db_password'' | * :!: Change ''db_password'' |
| |
| "notepad.exe" "%SystemDrive%\www\media\local\config\config.inc.php" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\media\local\config\database.inc.php" |
| |
| <code> | <code> |
| **** | **** |
| |
| "tar.exe" -czf "%UserProfile%\Downloads\piwigo-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" | "%SystemRoot%\System32\tar.exe" -czf "%UserProfile%\Downloads\piwigo-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" |
| |
| ===== Database ===== | ===== Database ===== |
| **** | **** |
| |
| CD "%UserProfile%\Downloads" && "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "piwigo.sql" "piwigo" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "%UserProfile%\Downloads\piwigo.sql" "piwigo" |
| |
| ====== Restore ====== | ====== Restore ====== |
| * [[#database|Initial set-up]] | * [[#database|Initial set-up]] |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" --execute="CREATE DATABASE piwigo" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" --execute="CREATE DATABASE piwigo" |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" "piwigo" < "%UserProfile%\Downloads\piwigo.sql" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" "piwigo" < "%UserProfile%\Downloads\piwigo.sql" |
| |
| ====== Resources ====== | ====== Resources ====== |
| ===== Albums Formatting ===== | ===== Albums Formatting ===== |
| |
| * :!: Using Emoji's (like 8-) [[https://emojipedia.org/smiling-face-with-sunglasses|from here]]) in comments causes MySQL exception | * :!: Using Emojis (like 8-) from [[https://emojipedia.org/smiling-face-with-sunglasses|Emojipedia]]) in comments caused a MySQL exception |
| |
| ==== 4 Links ==== | ==== 4 Links ==== |
| <a href="https://wiki.realmofespionage.xyz/games;windows;dota_2_steamcmd" target="_blank" rel="noopener">Notes</a> | <a href="https://wiki.realmofespionage.xyz/games;windows;dota_2_steamcmd" target="_blank" rel="noopener">Notes</a> |
| </code> | </code> |
| |
| ===== TODO ===== | |
| |
| * Show title on pictures (long titles get cut-off in navbar) | |
| |