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:39] 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' && '/usr/bin/node' '/usr/share/nodejs/npm/bin/npm-cli.js' --prefix '/var/www/main' ci --force --loglevel='silent'+  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 116: 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 204: 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 324: 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 339: 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 346: 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.1766399972.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