====== Information ====== * Joomla ((https://www.joomla.org)) * [[Information:Realm of Espionage]] * https://realmofespionage.xyz ===== Prerequisites ===== * [[windows;10|Windows 10 (21H2)]] * [[servers;windows;nginx_php_php-cgi|nginx + PHP + PHP-CGI]] * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]] * [[programs;windows;git|Git]] * [[programs;windows;nodejs_npm|Node.js + npm]] * [[servers;windows;mariadb|MariaDB]] ====== Dependencies ====== * https://docs.joomla.org/What_version_of_Joomla!_should_you_use%3F * https://docs.joomla.org/Special:MyLanguage/J5.x:Setting_Up_Your_Local_Environment * https://manual.joomla.org/docs/next/get-started/technical-requirements/ * https://docs.joomla.org/J5.x:Optional_Technical_Requirements ====== Download Source ====== * https://github.com/joomla/joomla-cms/branches * https://github.com/joomla/joomla-cms/commits/6.1-dev/ "%ProgramFiles%\Git\bin\git.exe" clone --branch "6.1-dev" --depth "1" --recurse-submodules "https://github.com/joomla/joomla-cms.git" "%SystemDrive%\www\main" ====== Database ====== "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" -p CREATE DATABASE joomla_db; CREATE USER 'joomla'@'localhost' IDENTIFIED BY 'x'; GRANT ALL PRIVILEGES ON joomla_db.* to 'joomla'@'localhost'; FLUSH PRIVILEGES;EXIT; ====== Environment ====== ===== PHP ===== "notepad.exe" "%SystemDrive%\www\php\main.ini" [PHP] extension_dir = ".\ext" extension = "curl" extension = "gd" extension = "intl" extension = "ldap" extension = "mbstring" extension = "mysqli" extension = "openssl" extension = "sodium" error_reporting = "~E_ALL" display_errors = "Off" log_errors = "Off" post_max_size = "5M" upload_max_filesize = "5M" [Date] date.timezone = "America/New_York" ; End "php.exe" -c "%SystemDrive%\www\php\main.ini" -m ===== Composer ===== * [[https://github.com/composer/composer/releases/latest/download/composer.phar|composer.phar]] MKDIR "%SystemDrive%\www\ext" "%SystemDrive%\www\ext\composer.phar" "php.exe" -c "%SystemDrive%\www\php\main.ini" "%SystemDrive%\www\ext\composer.phar" --version CD "%SystemDrive%\www\main" && "php.exe" -c "%SystemDrive%\www\php\main.ini" "%SystemDrive%\www\ext\composer.phar" install --no-dev ===== Node.js ===== **** CD "%SystemDrive%\www\main" && "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%SystemDrive%\www\main" "ci" --verbose ====== nginx + PHP-CGI Configuration ====== ===== PHP-CGI ===== "notepad.exe" "%SystemDrive%\www\nginx\default.d\main.conf" 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:9001"; } # End ===== Server Block ===== "notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\main.conf" server { listen "443" "ssl"; http2 "on"; server_name "realmofespionage.xyz"; root "C:/www/main"; index "index.php"; include "C:/www/nginx/default.d/main.conf"; include "C:/www/nginx/default.d/headers.conf"; client_max_body_size "5M"; # access_log "logs/main-access.log"; # error_log "logs/main-error.log"; location "/api/" { try_files "$uri" "$uri/" "/api/index.php?$args"; } location "/" { try_files "$uri" "$uri/" "/index.php?$args"; } location "~*" "/(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$" { return "403"; error_page "403" "/403_error.html"; } location "~*" "\.(ico|pdf|flv)$" { expires "1y"; } location "~*" "\.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$" { expires "14d"; } } # End "%SystemDrive%\www\scripts\nginx\Reload.bat" ====== Scripts ====== ===== Folder ===== MKDIR "%SystemDrive%\www\scripts\main" "explorer.exe" "%SystemDrive%\www\scripts\main" ===== PHP-CGI ===== "notepad.exe" "%SystemDrive%\www\scripts\main\PHP-CGI.bat" @echo off SET "PHP_FCGI_MAX_REQUESTS=0" 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 :: End "%SystemDrive%\www\scripts\main\PHP-CGI.bat" ===== Update ===== "notepad.exe" "%SystemDrive%\www\scripts\main\Update.bat" @echo off TITLE Main Updater "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" reset --hard "origin/6.1-dev" "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" pull origin "6.1-dev" --rebase "php.exe" -c "%SystemDrive%\www\php\main.ini" "%SystemDrive%\www\ext\composer.phar" install --no-dev --working-dir="%SystemDrive%\www\main" "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%SystemDrive%\www\main" "ci" :: End "%SystemDrive%\www\scripts\main\Update.bat" ===== Back-up ===== * ''D:\Servers\Scheduled Backups'' "notepad.exe" "%SystemDrive%\www\scripts\main\Back-up.bat" @echo off TITLE Main Back-up :: User\Downloads ::"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" :: NAS "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" :: End "%SystemDrive%\www\scripts\main\Back-up.bat" ===== Maintenance ===== "notepad.exe" "%SystemDrive%\www\scripts\main\Maintenance.bat" @echo off TITLE Main Maintenance CALL "%SystemDrive%\www\scripts\main\Git Fix.bat" :: End "%SystemDrive%\www\scripts\main\Maintenance.bat" ===== Git Fix ===== * :!: Set email for ''user.email'' "notepad.exe" "%SystemDrive%\www\scripts\main\Git Fix.bat" @echo off TITLE Main Git Fix 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" add "." "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" config "user.email" "espionage724@x" "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\main" commit --message="x" "%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" reset --hard "origin/6.1-dev" "%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 :: End "%SystemDrive%\www\scripts\main\Git Fix.bat" ====== Shortcuts ====== ===== Autostart ===== ==== PHP-CGI ==== "explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\StartUp" "%SystemDrive%\www\scripts\main\PHP-CGI.bat" Main PHP-CGI ====== Task Scheduler ====== **** taskschd.msc ===== Update ===== * ''3:00:00 AM'' daily Main Update "%SystemDrive%\www\scripts\main\Update.bat" ===== Back-up ===== * Monthly -> All months -> Days: ''4'' * ''3:15:00 AM'' Main Back-up "%SystemDrive%\www\scripts\main\Back-up.bat" ===== Maintenance ===== * Monthly -> All months -> Days: ''4'' * ''3:30:00 AM'' Main Maintenance "%SystemDrive%\www\scripts\main\Maintenance.bat" ====== Initial Setup ====== * https://realmofespionage.xyz ====== Settings ====== ===== robots.txt ===== **** COPY /Y "%SystemDrive%\www\main\robots.txt.dist" "%SystemDrive%\www\main\robots.txt" ===== Setup ===== * System -> Setup -> Global Configuration -> Site -> Site Offline: Enabled * System -> Setup -> Global Configuration -> Site -> Offline Message: Use Custom Message This site is being built behind-the-scenes, check back later!
In the meantime, check out my wiki: RoE | Wiki
===== Templates ===== * System -> Templates -> Site Template Styles -> Cassiopeia Extended - Default: ''[x]'' * System -> Templates -> Site Template Styles -> Cassiopeia Extended - Default-> Advanced -> Title: ''Realm of Espionage'' ==== Theme Settings ==== * Navigation -> Megamenu Configuration -> Animation: Fading * Navigation -> Megamenu Configuration -> Duration: ''300'' * Add-ons -> Off-canvas Sidebar -> Enable: Off * Assignment -> Toggle Selection ==== Footer ==== === Copyright === * Last tested: 2024/02/01 on Joomla 5.1.0-dev, T3 Framework 3.2.0, and Purity III 2.1.0 == Logo == **** wget -O '/tmp/cc-by-sa-40.png' 'https://licensebuttons.net/l/by-sa/4.0/80x15.png' && sudo mv '/tmp/cc-by-sa-40.png' '/var/www/main/images/cc-by-sa-40.png' && sudo chown 'nginx':'nginx' '/var/www/main/images/cc-by-sa-40.png' && sudo restorecon -F -I -R '/var/www/main/images/cc-by-sa-40.png' && sync == Text == * Place text within the ''