servers:nginx:joomla
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
servers:nginx:joomla [2019/06/28 21:46] – [Database] Sean Rhone | servers:nginx:joomla [2024/02/01 08:15] (current) – Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Information ====== | ====== Information ====== | ||
- | * Joomla! ((https:// | + | * Joomla ((https:// |
- | * T3 Framework ((http://www.t3-framework.org)) | + | * :!: 5.1-dev ((https://github.com/ |
- | * Purity III ((https://www.joomlart.com/ | + | |
* [[Information: | * [[Information: | ||
* https:// | * https:// | ||
Line 10: | Line 9: | ||
* [[distros: | * [[distros: | ||
- | * [[servers: | + | * [[servers: |
- | * [[servers: | + | * [[servers: |
- | * [[servers: | + | * [[servers: |
===== Notes ===== | ===== Notes ===== | ||
- | * Use ''#'' | + | * Purity III ThemeMagic |
- | * New Window With Navigation is needed in order to have external links open in a new tab | + | |
- | * Icons should be 16x16 when shown in Menus and Titles need to have a space before them so the icon and text aren't too close to each other | + | ====== Dependencies ====== |
- | * Youtube's and Facebook's menu icon has to be named something other than '' | + | |
- | * Optimizing CSS from Purity III/T3 Templates seems to cause the hamburger icon for mobile to not show | + | * https:// |
+ | * https:// | ||
+ | * https:// | ||
+ | * '' | ||
+ | |||
+ | | ||
+ | |||
+ | ===== Old openSUSE ===== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo zypper install php8-sodium nodejs-common php-composer2 php8-mysql php8-fileinfo php8-ldap | ||
====== Download Source ====== | ====== Download Source ====== | ||
Line 26: | Line 36: | ||
**** | **** | ||
- | sudo git clone --branch 'staging' --depth ' | + | sudo git clone --branch '5.1-dev' --depth ' |
- | ===== SELinux | + | ====== Environment ====== |
- | | + | |
- | sudo semanage fcontext --add --type ' | + | ===== Composer ===== |
- | sudo restorecon | + | sudo su ' |
+ | |||
+ | cd '/ | ||
+ | |||
+ | ===== Node.js ===== | ||
+ | |||
+ | sudo su ' | ||
+ | |||
+ | cd '/ | ||
====== Database ====== | ====== Database ====== | ||
- | | + | |
- | CREATE DATABASE | + | CREATE DATABASE |
- | GRANT ALL PRIVILEGES ON joomla.* to ' | + | GRANT ALL PRIVILEGES ON joomla_db.* to ' |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== | ||
Line 54: | Line 74: | ||
< | < | ||
[main] | [main] | ||
+ | |||
+ | ; User/Group | ||
user = nginx | user = nginx | ||
group = nginx | group = nginx | ||
+ | ; Socket | ||
listen = / | listen = / | ||
- | listen.owner = nginx | + | listen.acl_users |
- | listen.group | + | |
listen.allowed_clients = 127.0.0.1 | listen.allowed_clients = 127.0.0.1 | ||
- | pm = dynamic | + | ; Process Management |
- | pm.max_children = 8 | + | pm = ondemand |
- | pm.start_servers | + | pm.max_children = 4 |
- | pm.min_spare_servers = 2 | + | pm.process_idle_timeout |
- | pm.max_spare_servers = 4 | + | |
+ | ; Fedora php.ini Defaults | ||
+ | php_value[session.save_handler] = " | ||
+ | php_value[session.save_path] = "/ | ||
+ | |||
+ | ; General | ||
php_value[date.timezone] = " | php_value[date.timezone] = " | ||
- | php_value[upload_tmp_dir] = "/ | ||
- | |||
php_value[max_execution_time] = " | php_value[max_execution_time] = " | ||
php_value[memory_limit] = " | php_value[memory_limit] = " | ||
- | php_value[post_max_size] = "10M" | + | php_value[post_max_size] = "30M" |
- | php_value[upload_max_filesize] = "10M" | + | php_value[upload_max_filesize] = "30M" |
+ | php_value[post_max_size] = "30M" | ||
php_value[max_file_uploads] = " | php_value[max_file_uploads] = " | ||
+ | php_value[upload_tmp_dir] = "/ | ||
- | php_value[session.save_handler] = files | + | ; End</ |
- | php_value[session.save_path] = / | + | |
- | php_value[soap.wsdl_cache_dir] = / | + | |
- | php_value[opcache.file_cache] = / | + | |
===== FastCGI ===== | ===== FastCGI ===== | ||
Line 90: | Line 113: | ||
location ~ \.(php|phar)(/ | location ~ \.(php|phar)(/ | ||
fastcgi_split_path_info ^(.+\.(?: | fastcgi_split_path_info ^(.+\.(?: | ||
- | |||
fastcgi_intercept_errors on; | fastcgi_intercept_errors on; | ||
fastcgi_index index.php; | fastcgi_index index.php; | ||
include fastcgi_params; | include fastcgi_params; | ||
- | fastcgi_param SCRIPT_FILENAME | + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
fastcgi_param PATH_INFO $fastcgi_path_info; | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_pass unix:/ | fastcgi_pass unix:/ | ||
Line 101: | Line 123: | ||
===== Server Block ===== | ===== Server Block ===== | ||
- | sudo -e '/ | + | |
+ | * [[https:// | ||
+ | |||
+ | | ||
< | < | ||
Line 113: | Line 138: | ||
include '/ | include '/ | ||
- | client_max_body_size '10M'; | + | client_max_body_size '30M'; |
- | | + | # |
# access_log | # access_log | ||
# error_log | # error_log | ||
+ | |||
+ | location /api/ { | ||
+ | try_files $uri $uri/ / | ||
+ | } | ||
location / { | location / { | ||
Line 128: | Line 157: | ||
error_page 403 / | error_page 403 / | ||
} | } | ||
+ | |||
+ | location ~* \.(ico|pdf|flv)$ { | ||
+ | expires 1y; | ||
+ | } | ||
+ | |||
+ | location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ { | ||
+ | expires 14d; | ||
+ | } | ||
+ | |||
}</ | }</ | ||
Line 133: | Line 171: | ||
* https:// | * https:// | ||
+ | * :!: If Joomla gives a 500 error, it's likely the '' | ||
- | ====== | + | ====== |
- | + | ||
- | ===== T3 Framework ===== | + | |
- | + | ||
- | * https:// | + | |
===== Purity III Template ===== | ===== Purity III Template ===== | ||
- | * https:// | + | * [[https:// |
- | * Requires [[servers: | + | |
- | * Latest known version: 1.1.8 | + | ==== Install ==== |
- | ====== Settings ====== | + | * [[https:// |
+ | * Install T3 Framework and Purity III from that downloads page | ||
- | ===== Global Configuration ===== | + | ==== System Dashboard |
- | ==== Site Meta Description ==== | + | * Templates -> Site Template Styles |
+ | * Set '' | ||
- | **** | + | ==== Theme Settings ==== |
- | | + | |
- | ==== Site Meta Keywords ==== | + | * Theme -> Logo Type: Text |
+ | * Theme -> Site Name: '' | ||
- | **** | + | |
+ | | ||
- | | + | |
- | ==== Content Rights ==== | + | * Assignment -> Toggle Selection |
- | **** | + | ==== Footer ==== |
- | Creative Commons Attribution-ShareAlike 4.0 International | + | === Copyright === |
- | ==== Articles ==== | + | * Last tested: 2024/02/01 on Joomla 5.1.0-dev, T3 Framework 3.2.0, and Purity III 2.1.0 |
- | * System > Global Configuration > Articles | + | == Logo == |
- | | + | **** |
- | | + | |
- | | + | |
- | | + | |
- | * Show Navigation: Hide | + | |
- | * Show Print: Hide | + | |
- | * Show Email: Hide | + | |
- | * Show Hits: Hide | + | |
- | ==== Menu ==== | + | wget -O '/ |
- | * Menus > Main Menu > Home > Page Display | + | == Text == |
- | * Show Page Heading: No | + | * Place text within the ''< |
+ | * Remove '' | ||
- | ===== Purity III ===== | + | sudo -e '/ |
- | ==== Edit Style ==== | + | < |
+ | < | ||
+ | <img src=" | ||
+ | </ | ||
- | * Show T3 Logo = Off ((if shown, it causes a 3rd-party asset to be loaded; why they didn't just include it in the theme files is beyond me)) | + | ==== Custom CSS ==== |
- | * Logo Type = Text | + | |
- | * Megamenu Animation | + | |
- | * Off-canvas Sidebar | + | |
- | ==== Theme Magic ==== | + | * :!: 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:// |
+ | * Also replaces ThemeMagic for Brand Primary Color, Footer Background, and Footer Text Color | ||
- | === Brand Primary 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 '/ |
- | #3D8BFF | + | < |
+ | html, | ||
- | === Footer Background === | + | body { |
+ | height: 100%; | ||
+ | } | ||
- | **** | + | a { |
+ | color: #3D8BFF; | ||
+ | } | ||
- | | + | a:hover { |
+ | color: | ||
+ | } | ||
- | === Footer Text Color === | + | .t3-mainnav { |
+ | background-color: | ||
+ | } | ||
- | **** | + | .logo a { |
+ | background: none; | ||
+ | } | ||
- | | + | .logo a:hover { |
+ | background: | ||
+ | } | ||
- | ===== Footer ===== | + | .t3-wrapper { |
+ | position: relative; | ||
+ | min-height: 100%; | ||
+ | } | ||
- | ==== Copyright ==== | + | .t3-footer { |
+ | position: absolute; | ||
+ | bottom: 0; | ||
+ | left: 0; | ||
+ | right: 0; | ||
+ | background-color: | ||
+ | color: #FFFFFF; | ||
+ | } | ||
- | * Requires [[servers:nginx:joomla# | + | .t3-copyright { |
+ | padding-top: 20px; | ||
+ | padding-bottom: 0px; | ||
+ | }</ | ||
- | === Logo === | + | ===== Articles ===== |
- | **** | + | ==== Home ==== |
- | | + | |
+ | * Add links to '' | ||
- | === Text === | + | < |
+ | |||
- | * Place text within the ''< | + | Welcome! Realm of Espionage is a personal project composed of various services. All services on RoE are free and open-source, self-hosted, |
- | * Remove '' | + | |
- | sudo -H -u ' | + | |
- | < | + | This domain serves as a landing page and provides links to my most-used profiles and projects. To view them, use the navigation bar (desktop) or the ≡ hamburger icon (mobile) at the top of the screen. |
- | < | + | |
- | <img src=" | + | |
- | </ | + | |
- | === Position Fix === | + | </ |
- | * This places the footer back at the bottom of the screen instead of floating half-way up the page when little content exists | + | ===== Menus ===== |
- | * This also shrinks the footer height a bit | + | |
- | * Fix adapted from https:// | + | |
- | * Requires [[servers: | + | |
- | | + | |
+ | * Icon sizes are 24x24 | ||
+ | * Menu entries should be named normally before saving for a proper '' | ||
- | html, | + | ===== Global Configuration ===== |
- | + | ||
- | body { | + | |
- | height: 100%; | + | |
- | } | + | |
- | + | ||
- | .t3-wrapper { | + | |
- | position: relative; | + | |
- | min-height: 100%; | + | |
- | } | + | |
- | + | ||
- | .t3-footer { | + | |
- | position: absolute; | + | |
- | bottom: 0; | + | |
- | left: 0; | + | |
- | right: 0; | + | |
- | } | + | |
- | + | ||
- | .t3-copyright { | + | |
- | padding-top: | + | |
- | padding-bottom: | + | |
- | } | + | |
- | ==== T3 Footer Remove | + | ==== Site Meta Description |
- | | + | **** |
- | .t3-copyright { | + | |
- | display: none; | + | |
- | } | + | |
- | ===== Articles ===== | + | ==== Content Rights |
- | ==== Home ==== | + | **** |
- | | + | |
- | * Add links to '' | + | |
- | < | + | ==== Articles ==== |
- | + | ||
- | Welcome! Realm of Espionage is a personal project composed of various services. All services on RoE are free and open-source, self-hosted, and configured with strict security in-mind. My most prominent project currently is RoE | Wiki, a DokuWiki instance that holds my notes on all sorts of operating system, client, and server deployments, | + | * System |
- | + | * Show Title: Hide | |
+ | * Show Category: Hide | ||
+ | * Show Author: Hide | ||
+ | * Show Publish Date: Hide | ||
+ | * Show Navigation: Hide | ||
+ | * Show Print: Hide | ||
+ | * Show Email: Hide | ||
+ | * Show Hits: Hide | ||
- | This domain serves as a landing page and provides links to my most-used profiles and projects. To view them, use the navigation bar (desktop) or the hamburger icon (mobile) at the top of the screen. | + | ==== Menu ==== |
- | </code> | + | * Menus -> Main Menu -> Home -> Link Type -> Display in Menu: No |
+ | * Menus -> Main Menu -> Home -> Page Display -> Show Page Heading: Hide | ||
====== Services ====== | ====== Services ====== | ||
Line 304: | Line 343: | ||
==== Service ==== | ==== Service ==== | ||
+ | |||
+ | * 2023/09/12: TODO: SELinux prevents various actions with '' | ||
sudo -e '/ | sudo -e '/ | ||
Line 312: | Line 353: | ||
Group=nginx | Group=nginx | ||
Type=oneshot | Type=oneshot | ||
- | ExecStart='/ | + | WorkingDirectory=/ |
+ | Environment=" | ||
+ | ExecStart='/ | ||
+ | ExecStart='/ | ||
+ | # | ||
+ | # | ||
ExecStartPost='/ | ExecStartPost='/ | ||
==== Timer ==== | ==== Timer ==== | ||
- | * Every day at '' | + | * Every day at '' |
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
[Unit] | [Unit] | ||
- | Description=Joomla! Git Updater | + | Description=Joomla Git Updater |
After=network-online.target | After=network-online.target | ||
Wants=network-online.target | Wants=network-online.target | ||
[Timer] | [Timer] | ||
- | OnCalendar=*-*-* | + | OnCalendar=*-*-* |
Persistent=true | Persistent=true | ||
Line 351: | Line 397: | ||
==== Timer ==== | ==== Timer ==== | ||
- | * '' | + | * '' |
sudo -e '/ | sudo -e '/ | ||
Line 357: | Line 403: | ||
< | < | ||
[Unit] | [Unit] | ||
- | Description=Joomla! Maintenance | + | Description=Joomla Maintenance |
After=network-online.target | After=network-online.target | ||
Wants=network-online.target | Wants=network-online.target | ||
[Timer] | [Timer] | ||
- | OnCalendar=*-*-01 | + | OnCalendar=*-*-01 |
Persistent=true | Persistent=true | ||
Line 380: | Line 426: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
=== Timer === | === Timer === | ||
- | * '' | + | * '' |
sudo -e '/ | sudo -e '/ | ||
Line 391: | Line 437: | ||
< | < | ||
[Unit] | [Unit] | ||
- | Description=Joomla! Files Backup | + | Description=Joomla Files Backup |
[Timer] | [Timer] | ||
- | OnCalendar=*-*-01 | + | OnCalendar=*-*-01 |
Persistent=true | Persistent=true | ||
Line 404: | Line 450: | ||
=== Database Auth === | === Database Auth === | ||
- | sudo -u ' | + | sudo mkdir -p '/var/lib/mysql/auth' |
< | < | ||
- | [mysqldump] | + | [mariadb-dump] |
user=joomla | user=joomla | ||
password=x</ | password=x</ | ||
Line 413: | Line 459: | ||
=== Service === | === Service === | ||
- | mkdir -p ~/' | + | mkdir -p ~/' |
< | < | ||
Line 419: | Line 465: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStartPre='/ | + | ExecStartPre='/ |
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
Line 426: | Line 472: | ||
=== Timer === | === Timer === | ||
- | * Every day at '' | + | * Every day at '' |
sudo -e '/ | sudo -e '/ | ||
Line 432: | Line 478: | ||
< | < | ||
[Unit] | [Unit] | ||
- | Description=Joomla! Database Backup | + | Description=Joomla Database Backup |
After=mariadb.service | After=mariadb.service | ||
[Timer] | [Timer] | ||
- | OnCalendar=*-*-* | + | OnCalendar=*-*-* |
Persistent=true | Persistent=true | ||
Line 464: | Line 510: | ||
**** | **** | ||
- | sudo -u ' | + | sudo mariadb-dump --defaults-extra-file='/ |
==== Start Services ==== | ==== Start Services ==== | ||
Line 478: | Line 524: | ||
**** | **** | ||
- | scp espionage724@192.168.1.153: | + | scp espionage724@192.168.1.152: |
====== Restore ====== | ====== Restore ====== | ||
Line 494: | Line 540: | ||
**** | **** | ||
- | scp ~/' | + | scp ~/' |
==== Remove Files ==== | ==== Remove Files ==== | ||
Line 510: | Line 556: | ||
sudo systemctl stop nginx php-fpm | sudo systemctl stop nginx php-fpm | ||
- | ==== Restore Joomla! Folder ==== | + | ==== Restore Joomla Folder ==== |
**** | **** | ||
- | cd '/ | + | cd '/ |
- | + | ||
- | ==== SELinux ==== | + | |
- | + | ||
- | sudo semanage fcontext --deleteall "/ | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
==== Drop Previous Database ==== | ==== Drop Previous Database ==== | ||
- | | + | |
- | DROP DATABASE | + | DROP DATABASE |
FLUSH TABLES; | FLUSH TABLES; | ||
+ | |||
+ | EXIT | ||
==== Re-create Databases ==== | ==== Re-create Databases ==== | ||
- | | + | |
- | CREATE DATABASE | + | CREATE DATABASE |
+ | |||
+ | EXIT | ||
==== Restore Database ==== | ==== Restore Database ==== | ||
Line 542: | Line 584: | ||
**** | **** | ||
- | | + | |
==== Reapply Permissions ==== | ==== Reapply Permissions ==== | ||
- | | + | |
- | GRANT ALL PRIVILEGES ON joomla.* to ' | + | GRANT ALL PRIVILEGES ON joomla_db.* to ' |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
==== Start Services ==== | ==== Start Services ==== | ||
Line 560: | Line 604: | ||
==== Remove Backups ==== | ==== Remove Backups ==== | ||
- | * Verify that Joomla! works before running | + | * Verify that Joomla works before running |
rm ~/' | rm ~/' | ||
+ |
/var/www/wiki/data/attic/servers/nginx/joomla.1561772764.txt.gz · Last modified: 2019/06/28 21:46 by Sean Rhone