====== Information ====== * Joomla ((https://www.joomla.org)) * :!: 5.2-dev ((https://github.com/joomla/joomla-cms/tree/5.2-dev)) * [[Information:Realm of Espionage]] * https://realmofespionage.xyz ===== Prerequisites ===== * [[windows:10|Windows 10]] * [[windows;servers;nginx_php_php-cgi|nginx + PHP + PHP-CGI]] * [[windows;servers;nginx;lets_encrypt|Certbot (Let's Encrypt)]] ===== Notes ===== * Purity III ThemeMagic is not available with Joomla 4.x ([[https://www.joomlart.com/forums/d/46542-theme-magic-option-is-not-visible/2|source]]) * :!: 2024/06/27: WIP ====== Dependencies ====== * 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 ===== Git ===== * https://www.git-scm.com/download/win * Last tested: ''Git-2.45.2-64-bit.exe'' * Git from the command line and also from 3rd-party software ===== MySQL ===== * https://dev.mysql.com/downloads/windows/ * Last tested: ''mysql-installer-community-8.0.37.0.msi'' ===== SQLyog Community Edition ===== * https://github.com/webyog/sqlyog-community/wiki/Downloads * Last tested: ''SQLyog-13.2.1-0.x64Community.exe'' ===== Composer ===== * https://getcomposer.org/download/ * Last tested version: ''v2.7.7'' ===== Node.js ===== * https://nodejs.org/en/download/prebuilt-installer (Current) * Last tested: ''node-v22.3.0-x64.msi'' ====== Download Source ====== git clone --branch "5.2-dev" --depth "1" --recurse-submodules "https://github.com/joomla/joomla-cms.git" "C:\www\main" explorer "C:\www\main" ====== Environment ====== * https://docs.joomla.org/Special:MyLanguage/J5.x:Setting_Up_Your_Local_Environment ===== PHP ===== notepad++ "%SystemDrive%\www\php\main-php.ini" [PHP] extension_dir = ".\ext" extension="gd" extension="sodium" extension="ldap" extension="mysqli" extension="openssl" [Date] date.timezone = "America/New_York" ==== Old ==== ; Fedora php.ini Defaults php_value[session.save_handler] = "files" php_value[session.save_path] = "/var/lib/php/session" ; General php_value[max_execution_time] = "200" php_value[memory_limit] = "512M" php_value[post_max_size] = "30M" php_value[upload_max_filesize] = "30M" php_value[post_max_size] = "30M" php_value[max_file_uploads] = "100" php_value[upload_tmp_dir] = "/tmp" ===== Composer ===== **** CD "%SystemDrive%\php-"*"-nts-Win32-vs16-x64\" && "php.exe" -c "%SystemDrive%\www\php\main-php.ini" "%ProgramData%\ComposerSetup\bin\composer.phar" install --working-dir="%SystemDrive%\www\main" ===== Node.js ===== **** CD "%SystemDrive%\www\main\" && npm ci && npm audit fix ====== Database ====== CD "%ProgramFiles%\MySQL\MySQL Server 8.0\bin\" && mysql --user="root" --password CREATE USER "joomla"@"localhost" IDENTIFIED BY "x"; CREATE DATABASE joomla_db; GRANT ALL PRIVILEGES ON joomla_db.* to "joomla"@"localhost"; FLUSH PRIVILEGES; EXIT ====== nginx + PHP-CGI Configuration ====== ===== PHP-CGI ===== notepad++ "%SystemDrive%\www\nginx-default.d\main.conf" # PHP-CGI location ~ \.(php|phar)(/.*)?$ { fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$; fastcgi_intercept_errors on; fastcgi_index index.php; include 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; } ==== Process ==== ===== Server Block ===== * 2023/09/12: CSPs disabled; TODO: Re-figure out CSPs * [[https://docs.joomla.org/Nginx|Nginx - Joomla! Documentation]] notepad++ "%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 "30M"; # add_header Content-Security-Policy "default-src "self"; script-src "self" "unsafe-inline" "unsafe-eval"; style-src "self" "unsafe-inline"" always; # 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; } } "%UserProfile%\Desktop\nginx Reload.bat" ====== Initial Setup ====== * https://realmofespionage.xyz * :!: If Joomla gives a 500 error, it's likely the ''sessions'' folder not having the right permissions, see [[servers:nginx_php_php-fpm#permissions]] ====== Settings ====== ===== Purity III Template ===== * [[https://www.joomlart.com/joomla/templates/purity-iii|Purity III]] ==== Install ==== * [[https://www.joomlart.com/member/downloads/joomlart/free-templates/purity-iii|Downloads]] * Install T3 Framework and Purity III from that downloads page ==== System Dashboard ==== * Templates -> Site Template Styles * Set ''purity_III - Default'' to Default ==== Theme Settings ==== * General -> Show T3 Logo: Off * Theme -> Logo Type: Text * Theme -> Site Name: ''Realm of Espionage'' * 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 ''