====== Information ====== * Joomla ((https://www.joomla.org)) * :!: [[https://github.com/joomla/joomla-cms/tree/5.3-dev|5.3-dev]] branch ((Joomla version relies mainly on [[#purity_iii_template|Purity III/T3 support]]; 5.* works, 6+ unknown)) * [[Information:Realm of Espionage]] * https://realmofespionage.xyz ===== Prerequisites ===== * [[linux:distros:server:fedora_server|Fedora Server]] * [[servers:linux:mariadb|MariaDB]] * [[servers:linux:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] * [[servers:linux:nginx:lets_encrypt|Let's Encrypt]] ====== 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 sudo dnf install composer nodejs php-ldap php-mysqlnd php-mbstring php-gd php-sodium ====== Download Source ====== * https://github.com/joomla/joomla-cms/branches * ''5.3-dev'' ((Joomla version relies mainly on [[#purity_iii_template|Purity III/T3 support]]; 5.* works, 6+ unknown)) sudo git clone --branch '5.3-dev' --depth '1' --recurse-submodules 'https://github.com/joomla/joomla-cms.git' '/var/www/main' && sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' '/var/www/main(/.*)?' && sudo restorecon -F -I -R '/var/www/main' && sudo chown -R 'nginx':'nginx' '/var/www/main' && sync ====== Environment ====== * https://docs.joomla.org/Special:MyLanguage/J5.x:Setting_Up_Your_Local_Environment ===== Composer ===== sudo su 'nginx' -s '/bin/bash' cd '/var/www/main' && composer install ===== Node.js ===== sudo su 'nginx' -s '/bin/bash' cd '/var/www/main' && npm ci && npm audit fix && sync ====== Databases ====== mariadb -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 ====== nginx + PHP-FPM Configuration ====== ===== PHP-FPM Socket ===== sudo -e '/etc/php-fpm.d/main.conf' && sudo systemctl restart 'php-fpm' [main] ; User/Group user = nginx group = nginx ; Socket listen = /run/php-fpm/main.sock listen.acl_users = nginx listen.allowed_clients = 127.0.0.1 ; Process Management pm = ondemand pm.max_children = 4 pm.process_idle_timeout = 30 ; Fedora php.ini Defaults php_value[session.save_handler] = "files" php_value[session.save_path] = "/var/lib/php/session" ; General php_value[date.timezone] = "America/New_York" 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" ; End ===== FastCGI ===== sudo -e '/etc/nginx/default.d/main.conf' # PHP-FPM 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_pass unix:/run/php-fpm/main.sock; } ===== Server Block ===== * 2023/09/12: CSPs disabled; TODO: Re-figure out CSPs * [[https://docs.joomla.org/Nginx|Nginx - Joomla! Documentation]] sudo -e '/etc/nginx/vhosts.d/main.conf' && sudo systemctl restart 'nginx' && sync server { listen '443' 'ssl'; http2 'on'; server_name 'realmofespionage.xyz'; root '/var/www/main'; index 'index.php'; include '/etc/nginx/default.d/main.conf'; include '/etc/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 /var/log/nginx/main-access.log; # error_log /var/log/nginx/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; } } ====== Initial Setup ====== * https://realmofespionage.xyz * :!: If Joomla gives a 500 error, it's likely the ''sessions'' folder not having the right permissions, see [[servers:linux:nginx_php_php-fpm#permissions|nginx - 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]] * Download **Purity III Template** and **T3 System Plugin** (:!: not 20 MB+ quickstarts; **not** ''Purity III for Joomla 5'') ==== 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 ''