User Tools

Site Tools


servers:windows:nginx:piwigo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:windows:nginx:piwigo [2026/01/17 11:06] Sean Rhoneservers:windows:nginx:piwigo [2026/02/01 20:41] (current) – [Albums Formatting] Sean Rhone
Line 133: Line 133:
  
 ====== Scripts ====== ====== Scripts ======
- 
-===== Folder ===== 
  
   MKDIR "%SystemDrive%\www\scripts\media"   MKDIR "%SystemDrive%\www\scripts\media"
Line 146: Line 144:
 <code> <code>
 @echo off @echo off
 +
 +CD "%Temp%"
  
 SET "PHP_FCGI_MAX_REQUESTS=0" SET "PHP_FCGI_MAX_REQUESTS=0"
Line 151: Line 151:
  
 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 "php-cgi.exe" -b "127.0.0.1:9003" -c "%SystemDrive%\www\php\media.ini" -q
 +
 +SET "PHP_FCGI_MAX_REQUESTS="
 +SET "PHP_FCGI_CHILDREN="
  
 :: End</code> :: End</code>
Line 164: Line 167:
  
 TITLE Media Updater TITLE Media Updater
 +CD "%Temp%"
  
 "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" reset --hard "origin/master" "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" reset --hard "origin/master"
Line 176: Line 180:
  
 ===== Back-up ===== ===== Back-up =====
- 
-  * ''D:\Servers\Scheduled Backups'' 
  
   "notepad.exe" "%SystemDrive%\www\scripts\media\Back-up.bat"   "notepad.exe" "%SystemDrive%\www\scripts\media\Back-up.bat"
Line 185: Line 187:
  
 TITLE Media Back-up TITLE Media Back-up
 +CD "%Temp%"
 +
 +"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"
  
-:: User\Downloads 
 ::"tar.exe" -czf "%UserProfile%\Downloads\piwigo-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" ::"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.2\bin\mariadb-dump.exe" -u "root" --opt -r "%UserProfile%\Downloads\%RANDOM%-piwigo.sql" "piwigo"
- 
-:: NAS 
-"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" 
  
 :: End</code> :: End</code>
Line 206: Line 207:
  
 TITLE Media Maintenance TITLE Media Maintenance
 +CD "%Temp%"
  
-CALL "%SystemDrive%\www\scripts\media\Git Fix.bat"+"%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 
 + 
 +"%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_darkroomfsck --full --strict
  
 :: End</code> :: End</code>
Line 215: Line 221:
 ===== Git Fix ===== ===== Git Fix =====
  
-  * :!: Set email for both ''user.email''+  * :!: Set **both** ''user.email''
  
   "notepad.exe" "%SystemDrive%\www\scripts\media\Git Fix.bat"   "notepad.exe" "%SystemDrive%\www\scripts\media\Git Fix.bat"
Line 223: Line 229:
  
 TITLE Media Git Fix TITLE Media Git Fix
 +CD "%Temp%"
  
-:################### +::################## 
-:# Piwigo +::# Piwigo 
-:###################+::##################
  
 RMDIR /S /Q "%SystemDrive%\www\media\.git" RMDIR /S /Q "%SystemDrive%\www\media\.git"
Line 232: Line 239:
 "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" add "." "%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" 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" commit --message="x"
Line 245: Line 252:
 "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" fsck --full --strict "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" fsck --full --strict
  
-:################### +::################## 
-:# Bootstrap Darkroom +::# Bootstrap Darkroom 
-:###################+::##################
  
 RMDIR /S /Q "%SystemDrive%\www\media\themes\bootstrap_darkroom\.git" RMDIR /S /Q "%SystemDrive%\www\media\themes\bootstrap_darkroom\.git"
Line 253: Line 260:
 "%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" 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" 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" commit --message="x"
Line 270: Line 277:
   "%SystemDrive%\www\scripts\media\Git Fix.bat"   "%SystemDrive%\www\scripts\media\Git Fix.bat"
  
-====== Shortcuts ======+====== Task Scheduler ======
  
-===== Autostart =====+===== PHP-CGI =====
  
-==== PHP-CGI ====+  * Auto-start
  
-  "explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\StartUp" +  SCHTASKS /Create /SC "ONLOGON/TN "Media PHP-CGI/TR "%SystemDrive%\www\scripts\media\PHP-CGI.bat" /F
- +
-  "%SystemDrive%\www\scripts\media\PHP-CGI.bat" +
- +
-  Media PHP-CGI +
- +
-====== Task Scheduler ====== +
- +
-**** +
- +
-  taskschd.msc+
  
 ===== Update ===== ===== Update =====
  
-  * ''1:00:00 AM'' daily+  * Daily ''01:00:00 AM''
  
-  Media Update +  SCHTASKS /Create /SC "DAILY" /TN "Media Update" /TR "%SystemDrive%\www\scripts\media\Update.bat" /ST "01:00" /F
- +
-  "%SystemDrive%\www\scripts\media\Update.bat" +
- +
-  SCHTASKS /Create /SC "ONCE" /TN "Media Update" /TR "%SystemDrive%\www\scripts\media\Update.bat" /ST "01:00" /F+
  
 ===== Back-up ===== ===== Back-up =====
  
-  * Monthly -> All months -> Days: ''2'' +  * Monthly (2nd) ''01:10:00 AM''
-  * ''1:15:00 AM'' +
- +
-  Media Back-up +
- +
-  "%SystemDrive%\www\scripts\media\Back-up.bat"+
  
-  SCHTASKS /Create /SC "MONTHLY" /D "2" /M "*" /TN "Media Back-up" /TR "%SystemDrive%\www\scripts\media\Back-up.bat" /ST "01:15" /F+  SCHTASKS /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 -> All months -> Days: ''2'' +  * Monthly (2nd) ''01:30:00 AM''
-  * ''1:30:00 AM'' +
- +
-  Media Maintenance +
- +
-  "%SystemDrive%\www\scripts\media\Maintenance.bat"+
  
   SCHTASKS /Create /SC "MONTHLY" /D "2" /M "*" /TN "Media Maintenance" /TR "%SystemDrive%\www\scripts\media\Maintenance.bat" /ST "01:30" /F   SCHTASKS /Create /SC "MONTHLY" /D "2" /M "*" /TN "Media Maintenance" /TR "%SystemDrive%\www\scripts\media\Maintenance.bat" /ST "01:30" /F
Line 339: Line 322:
 ===== config.inc.php ===== ===== config.inc.php =====
  
 +  * [[https://piwigo.org/forum/viewtopic.php?pid=159584#p159584|nginx Rewrite source]]
 +  * [[https://doc.piwigo.org/import-and-manage-photos/file-formats-compatible-piwigo#block-5cef6409208a4b3ead19b930f85942b2|Video Uploading source]]
   * [[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]]
  
Line 354: Line 339:
  
 // Hide PHP Warnings // Hide PHP Warnings
-$conf['show_php_errors'] = '0';+$conf['show_php_errors'] = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING;
  
 // Header Links // Header Links
 $conf['links'] = array( $conf['links'] = array(
   'https://realmofespionage.xyz' => 'Realm of Espionage',   'https://realmofespionage.xyz' => 'Realm of Espionage',
-  'https://wiki.realmofespionage.xyz' => 'RoE | Wiki', +  'https://wiki.realmofespionage.xyz/start' => 'RoE | Wiki', 
-  'https://blog.realmofespionage.xyz' => 'RoE | Blog',+  'https://blog.realmofespionage.xyz/' => 'RoE | Blog', 
 +  'https://social.realmofespionage.xyz/profile/espionage724' => 'RoE | Social', 
 +  'https://forums.realmofespionage.xyz/' => 'RoE | Forums', 
 +  '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',
Line 367: Line 355:
 // Video Uploading // Video Uploading
 $conf['upload_form_all_types'] = true; $conf['upload_form_all_types'] = true;
 +
 $conf['file_ext'] = array_merge( $conf['file_ext'] = array_merge(
   $conf['picture_ext'],   $conf['picture_ext'],
-  array('tiff', 'tif', 'mpg','zip','avi','mp3','ogg','pdf','webm','mp4')+  array('mp4','webmv','m4v','webm','mov')
   );   );
  
Line 375: Line 364:
 ?></code> ?></code>
  
-====== Albums Formatting ======+===== database.inc.php =====
  
-===== 4 Links =====+  * :!: Change ''db_password''
  
-  * https://media.realmofespionage.xyz/index/category/2+  "notepad.exe" "%SystemDrive%\www\media\local\config\config.inc.php"
  
 <code> <code>
-<a href="https://wiki.realmofespionage.xyz/games;windows;2004scape_localhost" target="_blank" rel="noopener">Windows</a> | <a href="https://wiki.realmofespionage.xyz/games;linux;2004scape_localhost" target="_blank" rel="noopener">Linux</a> | <a href="https://wiki.realmofespionage.xyz/games;bsd;2004scape_localhost" target="_blank" rel="noopener">FreeBSD</a> | <a href="https://lostcity.rs/t/singleplayer-main-branch-scripts-and-desktop-start-launchers-on-windows-linux-freebsd/54" target="_blank" rel="noopener">Lost City Forums</a> +<?php 
-</code>+$conf['dblayer''mysqli'; 
 +$conf['db_base'] = 'piwigo'; 
 +$conf['db_user''piwigo'; 
 +$conf['db_password''x'; 
 +$conf['db_host''localhost';
  
-===== Single Link =====+$prefixeTable 'piwigo_';
  
-  * https://media.realmofespionage.xyz/picture/268/category/17+define('PHPWG_INSTALLED', true); 
 +define('PWG_CHARSET', 'utf-8'); 
 +define('DB_CHARSET', 'utf8'); 
 +define('DB_COLLATE', '');
  
-<code> +?></code>
-<a href="https://wiki.realmofespionage.xyz/games;windows;dota_2_steamcmd" target="_blank" rel="noopener">Notes</a> +
-</code>+
  
-====== Files ======+====== Backup ======
  
-===== Backup =====+===== Folder =====
  
 **** ****
Line 401: Line 395:
   "tar.exe" -czf "%UserProfile%\Downloads\piwigo-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media"   "tar.exe" -czf "%UserProfile%\Downloads\piwigo-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media"
  
-====== Database ====== +===== Database =====
- +
-===== Backup =====+
  
 **** ****
  
-  CD "%UserProfile%\Downloads" && "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" -p --opt -r "piwigo.sql" "piwigo"+  CD "%UserProfile%\Downloads" && "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "piwigo.sql" "piwigo"
  
-===== Restore =====+====== Restore ====== 
 + 
 +===== Database =====
  
   * [[#database|Initial set-up]]   * [[#database|Initial set-up]]
  
-  "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" -p --execute="CREATE DATABASE piwigo"+  "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" --execute="CREATE DATABASE piwigo"
  
-  "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" -p "piwigo" < "%UserProfile%\Downloads\piwigo.sql"+  "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" "piwigo" < "%UserProfile%\Downloads\piwigo.sql" 
 + 
 +====== Resources ====== 
 + 
 +===== Albums Formatting ===== 
 + 
 +  * :!: Using Emojis (like 8-) from [[https://emojipedia.org/smiling-face-with-sunglasses|Emojipedia]]) in comments causes MySQL exception 
 + 
 +==== 4 Links ==== 
 + 
 +  * https://media.realmofespionage.xyz/index/category/
 + 
 +<code> 
 +<a href="https://wiki.realmofespionage.xyz/games;windows;2004scape_localhost" target="_blank" rel="noopener">Windows</a> | <a href="https://wiki.realmofespionage.xyz/games;linux;2004scape_localhost" target="_blank" rel="noopener">Linux</a> | <a href="https://wiki.realmofespionage.xyz/games;bsd;2004scape_localhost" target="_blank" rel="noopener">FreeBSD</a> | <a href="https://lostcity.rs/t/singleplayer-main-branch-scripts-and-desktop-start-launchers-on-windows-linux-freebsd/54" target="_blank" rel="noopener">Lost City Forums</a> 
 +</code> 
 + 
 +==== Single Link ==== 
 + 
 +  * https://media.realmofespionage.xyz/picture/268/category/17 
 + 
 +<code> 
 +<a href="https://wiki.realmofespionage.xyz/games;windows;dota_2_steamcmd" target="_blank" rel="noopener">Notes</a> 
 +</code>
  
-====== TODOs ======+====== TODO ======
  
   * Show title on pictures (long titles get cut-off in navbar)   * 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]]) 
  
/usr/local/www/wiki/data/attic/servers/windows/nginx/piwigo.1768665969.txt.gz · Last modified: by Sean Rhone