| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:joomla [2026/03/11 17:25] – [Prerequisites] Sean Rhone | servers:windows:nginx:joomla [2026/04/15 10:06] (current) – [PHP-CGI] Sean Rhone |
|---|
| |
| * [[windows;10_ltsc_server|Windows 10 (21H2)]] | * [[windows;10_ltsc_server|Windows 10 (21H2)]] |
| * [[servers;windows;freenginx_php_php-cgi|freenginx + 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]] |
| ====== Download Source ====== | ====== Download Source ====== |
| |
| * https://github.com/joomla/joomla-cms/commits/6.1-dev/ | * https://github.com/joomla/joomla-cms/commits/7.0-dev/ |
| * https://github.com/joomla/joomla-cms/branches | * https://github.com/joomla/joomla-cms/branches |
| |
| "%ProgramFiles%\Git\bin\git.exe" clone --branch "6.1-dev" --depth "1" --recurse-submodules "https://github.com/joomla/joomla-cms.git" "%SystemDrive%\www\main" | "%ProgramFiles%\Git\bin\git.exe" clone --branch "7.0-dev" --depth "1" --recurse-submodules "https://github.com/joomla/joomla-cms.git" "%SystemDrive%\www\main" |
| |
| ====== Database ====== | ====== Database ====== |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" |
| |
| CREATE DATABASE joomla_db; | CREATE DATABASE joomla_db; |
| ===== PHP ===== | ===== PHP ===== |
| |
| "notepad.exe" "%SystemDrive%\www\php\main.ini" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\php\main.ini" |
| |
| <code> | <code> |
| * https://github.com/composer/composer | * https://github.com/composer/composer |
| |
| MKDIR "%SystemDrive%\www\ext" & DEL /Q "%SystemDrive%\www\ext\composer.phar" & "curl.exe" --output "%SystemDrive%\www\ext\composer.phar" --location "https://github.com/composer/composer/releases/latest/download/composer.phar" | MKDIR "%SystemDrive%\www\ext" & DEL /Q "%SystemDrive%\www\ext\composer.phar" & "%SystemRoot%\System32\curl.exe" --output "%SystemDrive%\www\ext\composer.phar" --location "https://github.com/composer/composer/releases/latest/download/composer.phar" --progress-bar |
| |
| "php.exe" -c "%SystemDrive%\www\php\main.ini" "%SystemDrive%\www\ext\composer.phar" --version | "php.exe" -c "%SystemDrive%\www\php\main.ini" "%SystemDrive%\www\ext\composer.phar" --version |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\default.d\main.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\default.d\main.conf" |
| |
| <code> | <code> |
| ===== Server Block ===== | ===== Server Block ===== |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\main.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\main.conf" |
| |
| <code> | <code> |
| # access_log "logs/main-access.log"; | # access_log "logs/main-access.log"; |
| # error_log "logs/main-error.log"; | # error_log "logs/main-error.log"; |
| | |
| | # location "~" "/installation/" { |
| | # deny "all"; |
| | # } |
| |
| location "/api/" { | location "/api/" { |
| MKDIR "%SystemDrive%\www\scripts\main" | MKDIR "%SystemDrive%\www\scripts\main" |
| |
| "explorer.exe" "%SystemDrive%\www\scripts\main" | "%SystemRoot%\explorer.exe" "%SystemDrive%\www\scripts\main" |
| |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\main\PHP-CGI.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\main\PHP-CGI.bat" |
| |
| <code> | <code> |
| SET "PHP_FCGI_CHILDREN=1" | SET "PHP_FCGI_CHILDREN=1" |
| |
| START "Main PHP-CGI" /MIN "php-cgi.exe" -b "127.0.0.1:9001" -c "%SystemDrive%\www\php\main.ini" -q | START "Main PHP-CGI" /MIN /D "%Temp%" "php-cgi.exe" -b "127.0.0.1:9001" -c "%SystemDrive%\www\php\main.ini" -q |
| |
| SET "PHP_FCGI_MAX_REQUESTS=" | SET "PHP_FCGI_MAX_REQUESTS=" |
| ===== Update ===== | ===== Update ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\main\Update.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\main\Update.bat" |
| |
| <code> | <code> |
| CD "%Temp%" | CD "%Temp%" |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" reset --hard "origin/6.1-dev" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" reset --hard "origin/7.0-dev" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" pull origin "6.1-dev" --rebase | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" pull origin "7.0-dev" --rebase |
| |
| DEL /Q "%Temp%\composer.phar" | |
| "curl.exe" --output "%Temp%\composer.phar" --location "https://github.com/composer/composer/releases/latest/download/composer.phar" --progress-bar | |
| DEL /Q "%SystemDrive%\www\ext\composer.phar" | |
| MOVE /Y "%Temp%\composer.phar" "%SystemDrive%\www\ext\composer.phar" | |
| "php.exe" -c "%SystemDrive%\www\php\main.ini" "%SystemDrive%\www\ext\composer.phar" install --no-dev --working-dir="%SystemDrive%\www\main" | "php.exe" -c "%SystemDrive%\www\php\main.ini" "%SystemDrive%\www\ext\composer.phar" install --no-dev --working-dir="%SystemDrive%\www\main" |
| |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\main\Back-up.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\main\Back-up.bat" |
| |
| <code> | <code> |
| CD "%Temp%" | CD "%Temp%" |
| |
| "tar.exe" -czf "D:\Servers\Scheduled Backups\joomla-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "main" | "%SystemRoot%\System32\tar.exe" -czf "D:\Servers\Scheduled Backups\joomla-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "main" |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "D:\Servers\Scheduled Backups\%RANDOM%-joomla.sql" "joomla_db" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "D:\Servers\Scheduled Backups\%RANDOM%-joomla.sql" "joomla_db" |
| |
| ::"tar.exe" -czf "%UserProfile%\Downloads\joomla-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "main" | ::"%SystemRoot%\System32\tar.exe" -czf "%UserProfile%\Downloads\joomla-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "main" |
| ::"%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "%UserProfile%\Downloads\%RANDOM%-joomla.sql" "joomla_db" | ::"%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "%UserProfile%\Downloads\%RANDOM%-joomla.sql" "joomla_db" |
| |
| :: End</code> | :: End</code> |
| ===== Maintenance ===== | ===== Maintenance ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\main\Maintenance.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\main\Maintenance.bat" |
| |
| <code> | <code> |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" fsck --full --strict | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" fsck --full --strict |
| |
| | DEL /Q "%Temp%\composer.phar" |
| | "%SystemRoot%\System32\curl.exe" --output "%Temp%\composer.phar" --location "https://github.com/composer/composer/releases/latest/download/composer.phar" -s |
| DEL /Q "%SystemDrive%\www\ext\composer.phar" | DEL /Q "%SystemDrive%\www\ext\composer.phar" |
| "curl.exe" --output "%SystemDrive%\www\ext\composer.phar" --location "https://github.com/composer/composer/releases/latest/download/composer.phar" | MOVE /Y "%Temp%\composer.phar" "%SystemDrive%\www\ext\composer.phar" |
| |
| :: End</code> | :: End</code> |
| * :!: Set ''user.email'' | * :!: Set ''user.email'' |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\main\Git Fix.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\main\Git Fix.bat" |
| |
| <code> | <code> |
| |
| RMDIR /S /Q "%SystemDrive%\www\main\.git" | RMDIR /S /Q "%SystemDrive%\www\main\.git" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" init --initial-branch="6.1-dev" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" init --initial-branch="7.0-dev" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" add "." | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" add "." |
| |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" remote add "origin" "https://github.com/joomla/joomla-cms.git" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" remote add "origin" "https://github.com/joomla/joomla-cms.git" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" pull --depth "1" --recurse-submodules "origin" "6.1-dev" --rebase | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" pull --depth "1" --recurse-submodules "origin" "7.0-dev" --rebase |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" reset --hard "origin/6.1-dev" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" reset --hard "origin/7.0-dev" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" gc --aggressive --prune="all" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" gc --aggressive --prune="all" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" fsck --full --strict | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" fsck --full --strict |
| * Auto-start | * Auto-start |
| |
| SCHTASKS /Create /SC "ONLOGON" /TN "Main PHP-CGI" /TR "%SystemDrive%\www\scripts\main\PHP-CGI.bat" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "ONLOGON" /TN "Main PHP-CGI" /TR "%SystemDrive%\www\scripts\main\PHP-CGI.bat" /F |
| |
| ===== Update ===== | ===== Update ===== |
| * Daily ''03:00:00 AM'' | * Daily ''03:00:00 AM'' |
| |
| SCHTASKS /Create /SC "DAILY" /TN "Main Update" /TR "%SystemDrive%\www\scripts\main\Update.bat" /ST "03:00" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "DAILY" /TN "Main Update" /TR "%SystemDrive%\www\scripts\main\Update.bat" /ST "03:00" /F |
| |
| ===== Back-up ===== | ===== Back-up ===== |
| * Monthly (4th) ''03:10:00 AM'' | * Monthly (4th) ''03:10:00 AM'' |
| |
| SCHTASKS /Create /SC "MONTHLY" /D "4" /M "*" /TN "Main Back-up" /TR "%SystemDrive%\www\scripts\main\Back-up.bat" /ST "03:10" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "MONTHLY" /D "4" /M "*" /TN "Main Back-up" /TR "%SystemDrive%\www\scripts\main\Back-up.bat" /ST "03:10" /F |
| |
| ===== Maintenance ===== | ===== Maintenance ===== |
| * Monthly (4th) ''03:30:00 AM'' | * Monthly (4th) ''03:30:00 AM'' |
| |
| SCHTASKS /Create /SC "MONTHLY" /D "4" /M "*" /TN "Main Maintenance" /TR "%SystemDrive%\www\scripts\main\Maintenance.bat" /ST "03:30" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "MONTHLY" /D "4" /M "*" /TN "Main Maintenance" /TR "%SystemDrive%\www\scripts\main\Maintenance.bat" /ST "03:30" /F |
| |
| ====== Initial Setup ====== | ====== Initial Setup ====== |
| |
| * Header Background: ''3D8BFF'' | * Header Background: ''3D8BFF'' |
| | * Header Text: ''FEFEFE'' |
| | * Body Background: ''E4E4E4'' |
| | * Body Text: TODO (default 23,23,23) |
| | * Links: ''FEFEFE'' |
| | * Links Hover: ''E4E4E4'' |
| | * Button Primary Background: TODO |
| | * Button Primary Hover Background: TODO |
| | * Button Primary Text: ''FEFEFE'' |
| | * Button Primary Hover Text: ''E4E4E4'' |
| * Footer Background: ''484848'' | * Footer Background: ''484848'' |
| | * Footer Text: ''FEFEFE'' |
| * Links Hover: | |
| | |
| rgb(224, 224, 224) | |
| | |
| == White == | |
| | |
| * Header Text | |
| * Body Background | |
| * Links | |
| * Button Primary Text | |
| * Button Primary Hover Text | |
| * Footer Text | |
| | |
| rgb(254, 254, 254) | |
| |
| ==== Footer ==== | ==== Footer ==== |
| ===== configuration.php ===== | ===== configuration.php ===== |
| |
| "notepad.exe" "%SystemDrive%\www\main\configuration.php" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\main\configuration.php" |
| |
| <code> public $dbtype = 'mysqli'; | <code> public $dbtype = 'mysqli'; |
| **** | **** |
| |
| "tar.exe" -czf "%UserProfile%\Downloads\joomla-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "main" | "%SystemRoot%\System32\tar.exe" -czf "%UserProfile%\Downloads\joomla-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "main" |
| |
| ===== Database ===== | ===== Database ===== |
| **** | **** |
| |
| CD "%UserProfile%\Downloads" && "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "joomla.sql" "joomla_db" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "%UserProfile%\Downloads\joomla.sql" "joomla_db" |
| |
| ====== Restore ====== | ====== Restore ====== |
| * [[#database|Initial set-up]] | * [[#database|Initial set-up]] |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" --execute="CREATE DATABASE joomla_db" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" --execute="CREATE DATABASE joomla_db" |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" "joomla_db" < "%UserProfile%\Downloads\joomla.sql" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" "joomla_db" < "%UserProfile%\Downloads\joomla.sql" |
| |