servers:windows:nginx:piwigo
                This is an old revision of the document!
Table of Contents
Information
Prerequisites
Dependencies
Git
- Last tested:Git-2.47.1.2-64-bit.exe
- Git from the command line and also from 3rd-party software
MariaDB Server
- Last tested:mariadb-11.6.2-winx64.msi
- No Development components or Third party tools
- Use UTF8 as default server's character set
- [x] Enable Networking
Download Source
"%ProgramFiles%\Git\bin\git.exe" clone --branch "master" --depth "1" --recurse-submodules "https://github.com/Piwigo/Piwigo.git" "%SystemDrive%\www\media"
explorer "%SystemDrive%\www\media"
Bootstrap Darkroom
"%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.6\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 "%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
CD "%SystemDrive%\" && "php.exe" -c "%SystemDrive%\www\php\media.ini" -m
freenginx + PHP-CGI Configuration
PHP-CGI
- fastcgi_paramsinclude hard-coded to freenginx version path
notepad "%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:/freenginx-1.27.4/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 "%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\freenginx\Reload.bat"
Batch Files
MKDIR "%SystemDrive%\www\scripts\media"
explorer "%SystemDrive%\www\scripts\media"
PHP-CGI
notepad "%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"
Autostart
explorer "%ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp"
"%SystemDrive%\www\scripts\media\PHP-CGI.bat"
Media PHP-CGI
Update
notepad "%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 :: 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 :: End
Maintenance
notepad "%SystemDrive%\www\scripts\media\Maintenance.bat"
@echo off :: Piwigo "%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" gc --aggressive --prune="all" "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" fsck --full --strict :: End
Back-up
Database
notepad "%SystemDrive%\www\scripts\media\Database Back-up.bat"
@echo off :: User\Downloads CD "%UserProfile%\Downloads" :: NAS ::CD /D "D:\Servers\Scheduled Backups" echo Root MariaDB user password prompt: "%ProgramFiles%\MariaDB 11.6\bin\mariadb-dump.exe" -u "root" -p --opt -r "piwigo-database-%RANDOM%.sql" "piwigo" pause :: End
Files
notepad "%SystemDrive%\www\scripts\media\Files Back-up.bat"
@echo off :: User\Downloads tar -czf "%UserProfile%\Downloads\piwigo-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" :: NAS ::tar -czf "D:\Servers\Scheduled Backups\piwigo-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "media" :: End
Initial Setup
Settings
- Disable - Allow user registrationimmediately under Configuration → Options → General → Permissions
- Activate Boostrap Darkroom theme
- Default photos order:Numeric identifier, 9 → 1
Page Banner
<p>Tech, hardware, food, nature, and gaming pictures and videos!</p>
config.inc.php
notepad "%SystemDrive%\www\media\local\config\config.inc.php"
<?php
// nginx Rewrite
$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
// Minimal Logging
$conf['log_level'] = 'EMERGENCY';
// Header Links
$conf['links'] = array(
  'https://realmofespionage.xyz' => '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
2004Scape (localhost)
<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>
2009Scape (localhost)
<a href="https://wiki.realmofespionage.xyz/servers;windows;games;2009scape_localhost" target="_blank" rel="noopener">Windows</a> | <a href="https://wiki.realmofespionage.xyz/servers;linux;games;2009scape_localhost" target="_blank" rel="noopener">Linux</a> | <a href="https://wiki.realmofespionage.xyz/servers;bsd;games;2009scape_localhost" target="_blank" rel="noopener">FreeBSD</a>
Diablo II
<a href="https://wiki.realmofespionage.xyz/games;windows;diablo_2" target="_blank" rel="noopener">Windows</a> | <a href="https://wiki.realmofespionage.xyz/games;linux;wine;diablo_2" target="_blank" rel="noopener">Linux</a> | <a href="https://wiki.realmofespionage.xyz/games;bsd;wine;diablo_2" target="_blank" rel="noopener">FreeBSD</a>
Espionage
Amazon (Spear), SP, Classic (non-LoD), /players 1
Old School RuneScape
<a href="https://secure.runescape.com/m=hiscore_oldschool_hardcore_ironman/hiscorepersonal?user1=Espionage724" target="_blank" rel="noopener">Hardcore</a> | <a href="https://secure.runescape.com/m=hiscore_oldschool_ironman/hiscorepersonal?user1=Espionage724" target="_blank" rel="noopener">Ironman</a> | <a href="https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal?user1=Espionage724" target="_blank" rel="noopener">Overall</a> | <a href="https://oldschool.runescape.wiki/w/Special:Contributions/Espionage724" target="_blank" rel="noopener">OSRS Wiki</a>
RuneScape
<a href="https://secure.runescape.com/m=hiscore_hardcore_ironman/compare?user1=Espionage724" target="_blank" rel="noopener">Hardcore</a> | <a href="https://secure.runescape.com/m=hiscore_ironman/compare?user1=Espionage724" target="_blank" rel="noopener">Ironman</a> | <a href="https://secure.runescape.com/m=hiscore/compare?user1=Espionage724" target="_blank" rel="noopener">Overall</a> | <a href="https://apps.runescape.com/runemetrics/app/overview/player/Espionage724" target="_blank" rel="noopener">RuneMetrics</a> | <a href="https://runescape.wiki/w/Special:Contributions/Espionage724" target="_blank" rel="noopener">RuneScape Wiki</a>
World of Warcraft 3.3.5
<a href="https://wiki.realmofespionage.xyz/servers;windows;games;trinitycore_3.3.5_localhost" target="_blank" rel="noopener">Windows</a> | <a href="https://wiki.realmofespionage.xyz/servers;linux;games;trinitycore_3.3.5_localhost" target="_blank" rel="noopener">Linux</a> | <a href="https://wiki.realmofespionage.xyz/servers;bsd;games;trinitycore_3.3.5_localhost" target="_blank" rel="noopener">FreeBSD</a> | <a href="https://talk.trinitycore.org/t/singleplayer-scripts-and-desktop-start-launchers-on-windows-linux-freebsd/33293" target="_blank" rel="noopener">TrinityCore Forums</a>
/usr/local/www/wiki/data/attic/servers/windows/nginx/piwigo.1738210402.txt.gz · Last modified:  by Sean Rhone
                
                