User Tools

Site Tools


servers:linux: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:linux:nginx:joomla [2025/12/22 05:11] – [Dependencies] Sean Rhoneservers:linux:nginx:joomla [2025/12/22 20:30] (current) Sean Rhone
Line 39: Line 39:
  
 ===== Node.js ===== ===== Node.js =====
 +
 +  * ''--force'' allow unsupported ''npm'' 9
  
   sudo su 'www-data' -s '/bin/bash'   sudo su 'www-data' -s '/bin/bash'
  
-  cd '/tmp' && npm --prefix '/var/www/main' ci+  cd '/tmp' && CYPRESS_CACHE_FOLDER='/var/www/main' '/usr/bin/node' '/usr/share/nodejs/npm/bin/npm-cli.js' --prefix '/var/www/main' ci --cache '/var/www/main' --force --verbose
  
   exit   exit
Line 62: Line 64:
 ===== PHP-FPM Socket ===== ===== PHP-FPM Socket =====
  
-  sudo -e '/etc/php8/fpm/php-fpm.d/main.conf' && sudo systemctl restart 'php-fpm'+  sudo -e '/etc/php/8.4/fpm/pool.d/main.conf' && sudo systemctl restart 'php8.4-fpm'
  
 <code> <code>
Line 69: Line 71:
 ; User/Group ; User/Group
 user = "www-data" user = "www-data"
-group = "www"+group = "www-data"
  
 ; Socket ; Socket
-listen = "/run/php-fpm/main.sock"+listen = "/run/php/main.sock"
 listen.owner = "www-data" listen.owner = "www-data"
-listen.group = "www"+listen.group = "www-data"
 listen.mode = "0662" listen.mode = "0662"
  
Line 82: Line 84:
 pm.process_idle_timeout = "30" pm.process_idle_timeout = "30"
  
-openSUSE php.ini Defaults +Logging
-php_value[session.save_path] = "/var/lib/php8/sessions" +
- +
-; General+
 php_value[log_errors] = "0" php_value[log_errors] = "0"
 php_value[error_reporting] = "~E_ALL" php_value[error_reporting] = "~E_ALL"
 +
 +; General
 php_value[date.timezone] = "America/New_York" 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[max_file_uploads] = "100" 
  
 ; End</code> ; End</code>
Line 99: Line 95:
 ===== FastCGI ===== ===== FastCGI =====
  
-  * ''main.sock''+  sudo -e '/etc/nginx/snippets/main.conf'
  
-  sudo -e '/etc/nginx/default.d/main.conf'+<code> 
 +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 'unix:/run/php/main.sock';
  
-<code> 
-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; 
 } }
  
Line 120: Line 118:
   * [[https://docs.joomla.org/Nginx|Nginx - Joomla! Documentation]]   * [[https://docs.joomla.org/Nginx|Nginx - Joomla! Documentation]]
  
-  sudo -e '/etc/nginx/vhosts.d/main.conf' && sudo systemctl reload 'nginx'+  sudo -e '/etc/nginx/sites-available/main.conf'
  
 <code> <code>
 server { server {
-    listen '443' 'ssl'; 
-    http2 'on'; 
-    server_name 'realmofespionage.xyz'; 
-    root '/var/www/main'; 
-    index 'index.php'; 
  
-    include '/etc/nginx/default.d/main.conf'; + listen '443' 'ssl'; 
-    include '/etc/nginx/default.d/headers.conf';+ http2 'on'; 
 + server_name 'realmofespionage.xyz'; 
 + root '/var/www/main'; 
 + index 'index.php';
  
-    client_max_body_size '30M';+ include '/etc/nginx/snippets/main.conf'; 
 + include '/etc/nginx/snippets/headers.conf';
  
-   access_log  /var/log/nginx/main-access.log; +# access_log '/var/log/nginx/main-access.log'
-   error_log  /var/log/nginx/main-error.log;+# error_log '/var/log/nginx/main-error.log';
  
-    location /api/ { + location '/api/
- try_files $uri $uri/ /api/index.php?$args; +  try_files '$uri' '$uri/' '/api/index.php?$args'
-    }+ }
  
-    location / { + location '/
-        try_files $uri $uri/ /index.php?$args; +  try_files '$uri' '$uri/' '/index.php?$args'
-    }+ }
  
-    location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ { + location '~*' '/(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$
-        return 403; +  return '403'
-        error_page 403 /403_error.html; +  error_page '403' '/403_error.html'
-    }+ }
  
-    location ~* \.(ico|pdf|flv)$ { + location '~*' '\.(ico|pdf|flv)$
-        expires 1y; +  expires '1y'
-    }+ }
  
-    location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ { + location '~*' '\.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$
-        expires 14d; +  expires '14d'
-    }+ }
    
 } }
  
 # End</code> # End</code>
 +
 +  sudo ln -s -f '/etc/nginx/sites-available/main.conf' '/etc/nginx/sites-enabled/main.conf' && sudo systemctl reload 'nginx'
  
 ====== Initial Setup ====== ====== Initial Setup ======
Line 208: Line 207:
             <img src="https://realmofespionage.xyz/images/cc-by-sa-40.png" width="80" height="15" /> All content and data available on Realm of Espionage is available under the <a href="https://creativecommons.org/licenses/by-sa/4.0" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International</a> license.             <img src="https://realmofespionage.xyz/images/cc-by-sa-40.png" width="80" height="15" /> All content and data available on Realm of Espionage is available under the <a href="https://creativecommons.org/licenses/by-sa/4.0" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International</a> license.
           </small></code>           </small></code>
- 
-==== Custom CSS ==== 
- 
-  * :!: This shrinks the footer height, and places it back at the bottom of the screen instead of floating half-way up the page when little content exists ([[https://www.joomlart.com/forums/topic/footer-on-bottom-of-screen-not-sticky/#post-898349|source 1]], [[https://www.joomlart.com/documentation/joomla-faqs/css-related-issues#footer-sticky|source 2]]) 
-  * Also replaces ThemeMagic for Brand Primary Color, Footer Background, and Footer Text Color 
- 
-  * Last tested: 2024/02/01 on Joomla 5.1.0-dev, T3 Framework 3.2.0, and Purity III 2.1.0 
- 
-  sudo -e '/var/www/main/templates/purity_iii/css/custom.css' && sudo chown 'nginx':'nginx' '/var/www/main/templates/purity_iii/css/custom.css' 
- 
-<code> 
-html, 
- 
-body { 
-  height: 100%; 
-} 
- 
-a { 
-  color: #3D8BFF; 
-} 
- 
-a:hover { 
-  color: #196BE4; 
-} 
- 
-.t3-mainnav { 
-  background-color: #3D8BFF; 
-} 
- 
-.logo a { 
-  background: none; 
-} 
- 
-.logo a:hover { 
-  background: #196BE4; 
-} 
- 
-.t3-wrapper { 
-  position: relative; 
-  min-height: 100%; 
-} 
- 
-.t3-footer { 
-  position: absolute; 
-  bottom: 0; 
-  left: 0; 
-  right: 0; 
-  background-color: #484848; 
-  color: #FFFFFF; 
-} 
- 
-.t3-copyright { 
-  padding-top: 20px; 
-  padding-bottom: 0px; 
-}</code> 
  
 ===== Articles ===== ===== Articles =====
Line 328: Line 272:
   * Menus -> Main Menu -> Home -> Link Type -> Display in Menu: No   * Menus -> Main Menu -> Home -> Link Type -> Display in Menu: No
   * Menus -> Main Menu -> Home -> Page Display -> Show Page Heading: Hide   * Menus -> Main Menu -> Home -> Page Display -> Show Page Heading: Hide
 +
 +====== Scripts ======
 +
 +===== Git Fix =====
 +
 +  * :!: Set email for ''user.email''
 +
 +  sudo mkdir -p '/etc/nginx/scripts/main' && sudo -e '/etc/nginx/scripts/main/git-fix.sh' && sudo chmod '0500' '/etc/nginx/scripts/main/git-fix.sh' && sudo chown 'www-data':'www-data' '/etc/nginx/scripts/main/git-fix.sh'
 +
 +<code>
 +#!/bin/bash
 +
 +cd '/tmp'
 +
 +'/usr/bin/rm' -Rf '/var/www/main/.git'
 +'/usr/bin/git' -C '/var/www/main' init --initial-branch='6.1-dev'
 +'/usr/bin/git' -C '/var/www/main' add '.'
 +
 +########################################
 +'/usr/bin/git' -C '/var/www/main' config 'user.email' 'espionage724@x'
 +########################################
 +
 +'/usr/bin/git' -C '/var/www/main' commit --message='x'
 +
 +'/usr/bin/git' -C '/var/www/main' remote add 'origin' 'https://github.com/joomla/joomla-cms.git'
 +'/usr/bin/git' -C '/var/www/main' pull --depth '1' --recurse-submodules 'origin' '6.1-dev' --rebase
 +
 +'/usr/bin/git' -C '/var/www/main' reset --hard 'origin/6.1-dev'
 +'/usr/bin/git' -C '/var/www/main' gc --aggressive --prune='all'
 +'/usr/bin/git' -C '/var/www/main' fsck --full --strict
 +
 +# End</code>
 +
 +  sudo -u 'www-data' '/etc/nginx/scripts/main/git-fix.sh'
  
 ====== Services ====== ====== Services ======
Line 343: Line 321:
 Type=oneshot Type=oneshot
  
-WorkingDirectory=/var/www/blog +WorkingDirectory=/var/www/main 
-Environment="COMPOSER_CACHE_DIR=/dev/null"+Environment="CYPRESS_CACHE_FOLDER='/var/www/main'"
  
 ExecStart='/usr/bin/git' -C '/var/www/main' reset --hard 'origin/6.1-dev' ExecStart='/usr/bin/git' -C '/var/www/main' reset --hard 'origin/6.1-dev'
Line 350: Line 328:
  
 ExecStart='/usr/bin/composer' --working-dir='/var/www/main' --no-cache install --no-dev ExecStart='/usr/bin/composer' --working-dir='/var/www/main' --no-cache install --no-dev
-ExecStart='/usr/bin/npm' --prefix '/var/www/main' ci --logs-max='0'+ExecStart='/usr/bin/node' '/usr/share/nodejs/npm/bin/npm-cli.js' --prefix '/var/www/main' ci --cache '/var/www/main' --force --logs-max='0'
  
 +ExecStartPost='/usr/bin/rm' -f '/var/www/main/administrator/cache/autoload_psr4.php'
 ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/sync'
  
/var/www/wiki/data/attic/servers/linux/nginx/joomla.1766398305.txt.gz · Last modified: by Sean Rhone

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki