User Tools

Site Tools


servers:bsd:nginx:joomla

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:bsd:nginx:joomla [2026/03/11 18:25] – omit=dev/production didn't work branch 7.0 Sean Rhoneservers:bsd:nginx:joomla [2026/10/05 01:18] (current) – Sean Rhone
Line 1: Line 1:
 +====== Information ======
 +
 +  * Joomla ((https://www.joomla.org))
 +  * [[Information:Realm of Espionage]]
 +  * https://test.realmofespionage.xyz
 +
 +  * :?: Previously failed with Cypress and Sass, but they look like [[https://github.com/joomla/joomla-cms/blob/aa58dfce5866faadffbc97d7223b34bbcb169c26/package.json#L97|dev dependencies]] and possibly optional with ''--production'' ([[https://stackoverflow.com/questions/60065865/is-there-a-way-of-making-npm-ci-install-devdependencies-or-npm-install-not/61364681#61364681|source]])
 +  * 2026/03/11: ''--omit=dev'' and ''--production'' failed with ''7.0''
 +
 +===== Prerequisites =====
 +
 +  * [[bsd:server:arm:freebsd_15.1|FreeBSD 15.1]]
 +  * [[servers:bsd:freenginx_php_php-fpm|freenginx + PHP + PHP-FPM]]
 +  * [[servers:bsd:nginx:lets_encrypt|Certbot (Let's Encrypt)]]
 +  * [[servers:bsd: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
 +
 +  su -
 +
 +  pkg install git-lite php84-mysqli php84-composer node23 npm-node23 php84-simplexml php84-dom php84-iconv php84-sodium
 +
 +====== Download Source ======
 +
 +  * https://github.com/joomla/joomla-cms/commits/6.0-dev/
 +  * https://github.com/joomla/joomla-cms/branches
 +
 +  su -
 +
 +  git clone --branch '6.0-dev' --depth '1' --recurse-submodules 'https://github.com/joomla/joomla-cms.git' '/usr/local/www/main' && chown -R 'www':'www' '/usr/local/www/main' && sync
 +
 +====== Environment ======
 +
 +  * https://docs.joomla.org/Special:MyLanguage/J5.x:Setting_Up_Your_Local_Environment
 +
 +===== Composer =====
 +
 +  su -
 +
 +  cd '/usr/local/www/main' && su -m 'www' -c "'/usr/local/bin/composer' install --ignore-platform-req='ext-ldap' --no-dev"
 +
 +===== Node.js =====
 +
 +  su -
 +
 +  cd '/usr/local/www/main' && su -m 'www' -c "'/usr/local/bin/npm' ci --verbose --cache '/tmp/main' --ignore-scripts"
 +
 +====== 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 =====
 +
 +  su -
 +
 +  ee '/usr/local/etc/php-fpm.d/main.conf' && service 'php_fpm' restart
 +
 +<code>
 +[main]
 +
 +; User/Group
 +user = www
 +group = www
 +
 +; Socket
 +listen = 127.0.0.1:9001
 +listen.allowed_clients = 127.0.0.1
 +
 +; Process Management
 +pm = ondemand
 +pm.max_children = 4
 +pm.process_idle_timeout = 30
 +
 +; General
 +php_value[date.timezone] = "America/New_York"
 +
 +; End</code>
 +
 +===== FastCGI =====
 +
 +  su -
 +
 +  ee '/usr/local/etc/nginx/default.d/main.conf'
 +
 +<code>
 +# 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_param HTTPS on;
 +    fastcgi_pass 127.0.0.1:9001;
 +}
 +
 +# End</code>
 +
 +===== Server Block =====
 +
 +  su -
 +
 +  ee '/usr/local/etc/nginx/vhosts.d/main.conf' && service 'nginx' reload && sync
 +
 +<code>
 +server {
 +    listen 443 ssl;
 +#    http2 on;
 +    server_name 'realmofespionage.xyz';
 +    root '/usr/local/www/main';
 +    index 'index.php';
 +
 +    include '/usr/local/etc/nginx/default.d/main.conf';
 +    include '/usr/local/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;
 +    }
 + 
 +}</code>
 +
 +====== 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]]
  
/usr/local/www/wiki/data/attic/servers/bsd/nginx/joomla.1773267937.txt.gz · Last modified: by Sean Rhone