====== Information ====== * Piwigo ((https://piwigo.org/)) * Bootstrap Darkroom Theme ((https://github.com/Piwigo/piwigo-bootstrap-darkroom)) * [[Information:Realm of Espionage]] * https://media.realmofespionage.xyz ===== Prerequisites ===== * [[windows;11_ltsc|Windows 11 (24H2)]] * [[servers;windows;nginx_php_php-cgi|nginx + PHP + PHP-CGI]] * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]] ====== Dependencies ====== * https://piwigo.org/guides/install/requirements ===== Git ===== * https://www.git-scm.com/download/win * Last tested: ''Git-2.48.1-64-bit.exe'' * Git from the command line and also from 3rd-party software ===== MariaDB Server ===== * https://mariadb.org/download/ * Last tested: ''mariadb-11.7.2-winx64.msi'' * No Development components or Third party tools * Use UTF8 as default server's character set * [x] Enable Networking ====== Download Source ====== * https://github.com/Piwigo/Piwigo/commits/master/ "%ProgramFiles%\Git\bin\git.exe" clone --branch "master" --depth "1" --recurse-submodules "https://github.com/Piwigo/Piwigo.git" "%SystemDrive%\www\media" "explorer.exe" "%SystemDrive%\www\media" ===== Bootstrap Darkroom ===== * https://github.com/Piwigo/piwigo-bootstrap-darkroom/commits/master/ "%ProgramFiles%\Git\bin\git.exe" clone --branch "master" --depth "1" --recurse-submodules "https://github.com/Piwigo/piwigo-bootstrap-darkroom.git" "%SystemDrive%\www\media\themes\bootstrap_darkroom" ====== Database ====== "%ProgramFiles%\MariaDB 11.7\bin\mariadb.exe" -u "root" -p CREATE DATABASE piwigo; CREATE USER 'piwigo'@'localhost' IDENTIFIED BY 'x'; GRANT ALL PRIVILEGES ON piwigo.* to 'piwigo'@'localhost'; FLUSH PRIVILEGES; EXIT ====== Environment ====== ===== PHP ===== "notepad.exe" "%SystemDrive%\www\php\media.ini" [PHP] ; Modules extension_dir = ".\ext" extension = "exif" extension = "gd" extension = "mbstring" extension = "mysqli" zend_extension = "opcache" ; Settings post_max_size = "100M" upload_max_filesize = "100M" [Date] date.timezone = "America/New_York" ; End "php.exe" -c "%SystemDrive%\www\php\media.ini" -m ====== nginx + PHP-CGI Configuration ====== ===== PHP-CGI ===== "notepad.exe" "%SystemDrive%\www\nginx\default.d\media.conf" # PHP-CGI location ~ \.(php)(/.*)?$ { fastcgi_split_path_info ^(.+\.(?:php))(/.*)$; fastcgi_intercept_errors "on"; fastcgi_index "index.php"; include "C:/www/nginx/conf/fastcgi_params"; fastcgi_param "SCRIPT_FILENAME" $document_root$fastcgi_script_name; fastcgi_param "PATH_INFO" $fastcgi_path_info; fastcgi_param "HTTPS" "on"; fastcgi_pass "127.0.0.1:9003"; } # End ===== Server Block ===== "notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\media.conf" server { listen "443" "ssl"; http2 "on"; server_name "media.realmofespionage.xyz"; root "C:/www/media"; index "index.php"; include C:/www/nginx/default.d/media.conf; include C:/www/nginx/default.d/headers.conf; client_max_body_size "100M"; # add_header Content-Security-Policy "default-src "self"; script-src "self" "unsafe-inline" "unsafe-eval"; style-src "self" "unsafe-inline"" always; # access_log logs/media-access.log; # error_log logs/media-error.log; # Install dir post-install block # # location "/install" { # location ~* \.(php)$ { # deny "all"; # } # } location / { index index.php; try_files $uri $uri/ @rewrite; } location @rewrite { rewrite ^/picture((/|$).*)$ /picture.php$1 last; rewrite ^/index((/|$).*)$ /index.php$1 last; rewrite ^/i((/|$).*)$ /i.php$1 last; } } # End "%SystemDrive%\www\scripts\nginx\Reload.bat" ====== Scripts ====== MKDIR "%SystemDrive%\www\scripts\media" "explorer.exe" "%SystemDrive%\www\scripts\media" ===== PHP-CGI ===== "notepad.exe" "%SystemDrive%\www\scripts\media\PHP-CGI.bat" SET "PHP_FCGI_MAX_REQUESTS=0" SET "PHP_FCGI_CHILDREN=1" START "Media PHP-CGI" "php-cgi.exe" -b "127.0.0.1:9003" -c "%SystemDrive%\www\php\media.ini" -q :: End "%SystemDrive%\www\scripts\media\PHP-CGI.bat" ===== Update ===== * https://github.com/Piwigo/Piwigo/commits/master/ * https://github.com/Piwigo/piwigo-bootstrap-darkroom/commits/master/ "notepad.exe" "%SystemDrive%\www\scripts\media\Update.bat" @echo off :: Piwigo "%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" fsck --full --strict :: 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" 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" fsck --full --strict :: End "%SystemDrive%\www\scripts\media\Update.bat" ====== Shortcuts ====== ===== Desktop ===== "%SystemDrive%\www\scripts\media\Update.bat" Media Update ===== Autostart ===== "explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\StartUp" "%SystemDrive%\www\scripts\media\PHP-CGI.bat" Media PHP-CGI ====== Initial Setup ====== * https://media.realmofespionage.xyz ====== Settings ====== * :!: Disable ''Allow user registration'' **immediately** under Configuration -> Options -> General -> Permissions * Activate Boostrap Darkroom theme * Default photos order: ''Numeric identifier, 9 -> 1'' ===== Page Banner ===== ****

Tech, hardware, food, nature, and gaming pictures and videos!

===== config.inc.php ===== * [[https://github.com/Piwigo/Piwigo/blob/master/include/config_default.inc.php|More Settings]] "notepad.exe" "%SystemDrive%\www\media\local\config\config.inc.php" 'Realm of Espionage', 'https://wiki.realmofespionage.xyz' => 'RoE | Wiki', 'https://blog.realmofespionage.xyz' => 'RoE | Blog', 'https://wiki.realmofespionage.xyz/user;espionage724' => 'Webmaster Info', 'https://wiki.realmofespionage.xyz/servers;windows;nginx;piwigo' => 'Instance Configuration Notes', ); // Video Uploading $conf['upload_form_all_types'] = true; $conf['file_ext'] = array_merge( $conf['picture_ext'], array('tiff', 'tif', 'mpg','zip','avi','mp3','ogg','pdf','webm','mp4') ); // End ?> ====== Albums Formatting ====== ===== 4 Links ===== * https://media.realmofespionage.xyz/index/category/2 Windows | Linux | FreeBSD | Lost City Forums ===== Single Link ===== * https://media.realmofespionage.xyz/picture/268/category/17 Notes ====== Database ====== ===== Backup ===== CD "%UserProfile%\Downloads" "%ProgramFiles%\MariaDB 11.7\bin\mariadb-dump.exe" -u "root" -p --opt -r "piwigo.sql" "piwigo" ===== Restore ===== * [[#database|Initial set-up]] "%ProgramFiles%\MariaDB 11.7\bin\mariadb.exe" -u "root" -p "piwigo" < "%UserProfile%\Downloads\piwigo.sql" "%ProgramFiles%\MariaDB 11.7\bin\mariadb.exe" -u "root" -p --execute="GRANT ALL PRIVILEGES ON piwigo.* to 'piwigo'@'localhost';" "%ProgramFiles%\MariaDB 11.7\bin\mariadb.exe" -u "root" -p --execute="DROP DATABASE piwigo" "%ProgramFiles%\MariaDB 11.7\bin\mariadb.exe" -u "root" -p --execute="CREATE DATABASE piwigo"