servers:nginx:joomla
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
servers:nginx:joomla [2019/06/28 21:43] – [Copyright] Sean Rhone | servers:nginx:joomla [2020/04/24 12:28] – Ubuntu 20.04 Sean Rhone | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | * [[distros:fedora_server|Fedora | + | * [[distros:ubuntu_server|Ubuntu |
- | * [[servers: | + | * [[servers: |
- | * [[servers: | + | * [[servers: |
- | * [[servers: | + | * [[servers: |
===== Notes ===== | ===== Notes ===== | ||
Line 26: | Line 26: | ||
**** | **** | ||
- | sudo git clone --branch ' | + | sudo git clone --branch ' |
- | + | ||
- | ===== SELinux ===== | + | |
- | + | ||
- | sudo semanage fcontext | + | |
- | + | ||
- | sudo semanage fcontext --add --type | + | |
- | + | ||
- | sudo restorecon -R -v '/ | + | |
====== Database ====== | ====== Database ====== | ||
- | mysql --user=' | + | |
CREATE DATABASE joomla; | CREATE DATABASE joomla; | ||
Line 45: | Line 37: | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== | ||
Line 50: | Line 44: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
[main] | [main] | ||
- | user = nginx | + | user = www-data |
- | group = nginx | + | group = www-data |
- | listen = /run/php-fpm/ | + | listen = / |
- | listen.owner = nginx | + | listen.owner = www-data |
- | listen.group = nginx | + | listen.group = www-data |
listen.allowed_clients = 127.0.0.1 | listen.allowed_clients = 127.0.0.1 | ||
Line 77: | Line 71: | ||
php_value[max_file_uploads] = " | php_value[max_file_uploads] = " | ||
- | php_value[session.save_handler] = files | + | php_value[session.save_handler] = "files" |
- | php_value[session.save_path] = / | + | php_value[session.save_path] = "/ |
- | php_value[soap.wsdl_cache_dir] = / | + | php_value[soap.wsdl_cache_dir] = "/ |
- | php_value[opcache.file_cache] = / | + | php_value[opcache.file_cache] = "/ |
===== FastCGI ===== | ===== FastCGI ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 96: | Line 90: | ||
fastcgi_param SCRIPT_FILENAME | fastcgi_param SCRIPT_FILENAME | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
- | fastcgi_pass unix:/ | + | fastcgi_pass unix:/ |
}</ | }</ | ||
===== Server Block ===== | ===== Server Block ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 110: | Line 104: | ||
index ' | index ' | ||
- | include '/ | + | include '/ |
- | include '/ | + | include '/ |
client_max_body_size ' | client_max_body_size ' | ||
Line 129: | Line 123: | ||
} | } | ||
}</ | }</ | ||
+ | |||
+ | ==== Enable ==== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo rm -f '/ | ||
====== Initial Setup ====== | ====== Initial Setup ====== | ||
Line 227: | Line 227: | ||
**** | **** | ||
- | sudo -H -u 'nginx' wget ' | + | sudo -H -u 'www-data' wget ' |
=== Text === | === Text === | ||
Line 234: | Line 234: | ||
* Remove '' | * Remove '' | ||
- | sudo -H -u 'nginx' -e '/ | + | sudo -H -u 'www-data' -e '/ |
< | < | ||
Line 248: | Line 248: | ||
* Requires [[servers: | * Requires [[servers: | ||
- | sudo -H -u 'nginx' -e '/ | + | sudo -H -u 'www-data' -e '/ |
html, | html, | ||
Line 309: | Line 309: | ||
< | < | ||
[Service] | [Service] | ||
- | User=nginx | + | User=www-data |
- | Group=nginx | + | Group=www-data |
Type=oneshot | Type=oneshot | ||
ExecStart='/ | ExecStart='/ | ||
- | ExecStartPost=' | + | ExecStartPost='/ |
==== Timer ==== | ==== Timer ==== | ||
Line 342: | Line 342: | ||
< | < | ||
[Service] | [Service] | ||
- | User=nginx | + | User=www-data |
- | Group=nginx | + | Group=www-data |
Type=oneshot | Type=oneshot | ||
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
- | ExecStartPost=' | + | ExecStartPost='/ |
==== Timer ==== | ==== Timer ==== | ||
Line 380: | Line 380: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStart=' | + | ExecStart='/ |
- | ExecStartPost=' | + | ExecStartPost='/ |
=== Timer === | === Timer === | ||
Line 412: | Line 412: | ||
=== Service === | === Service === | ||
- | |||
- | * :!: TODO: Figure out folder struture here | ||
mkdir -p ~/' | mkdir -p ~/' | ||
Line 422: | Line 420: | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
ExecStartPre='/ | ExecStartPre='/ | ||
- | ExecStart=' | + | ExecStart='/ |
- | ExecStart=' | + | ExecStart='/ |
- | ExecStartPost=' | + | ExecStartPost='/ |
=== Timer === | === Timer === | ||
Line 454: | Line 452: | ||
**** | **** | ||
- | sudo systemctl stop nginx php-fpm | + | sudo systemctl stop nginx php7.4-fpm |
==== Backup Folder ==== | ==== Backup Folder ==== | ||
Line 466: | Line 464: | ||
**** | **** | ||
- | sudo -u ' | + | sudo mysqldump --defaults-extra-file='/ |
==== Start Services ==== | ==== Start Services ==== | ||
Line 472: | Line 470: | ||
**** | **** | ||
- | sudo systemctl start nginx php-fpm | + | sudo systemctl start nginx php7.4-fpm |
===== Client ===== | ===== Client ===== | ||
Line 510: | Line 508: | ||
**** | **** | ||
- | sudo systemctl stop nginx php-fpm | + | sudo systemctl stop nginx php7.4-fpm |
==== Restore Joomla! Folder ==== | ==== Restore Joomla! Folder ==== | ||
Line 516: | Line 514: | ||
**** | **** | ||
- | cd '/ | + | cd '/ |
- | + | ||
- | ==== SELinux ==== | + | |
- | + | ||
- | sudo semanage fcontext --deleteall "/ | + | |
- | + | ||
- | sudo semanage fcontext --add --type ' | + | |
- | + | ||
- | sudo restorecon -R -v '/ | + | |
==== Drop Previous Database ==== | ==== Drop Previous Database ==== | ||
- | mysql --user=' | + | |
DROP DATABASE joomla; | DROP DATABASE joomla; | ||
FLUSH TABLES; | FLUSH TABLES; | ||
+ | |||
+ | EXIT | ||
==== Re-create Databases ==== | ==== Re-create Databases ==== | ||
- | mysql --user=' | + | |
CREATE DATABASE joomla; | CREATE DATABASE joomla; | ||
+ | |||
+ | EXIT | ||
==== Restore Database ==== | ==== Restore Database ==== | ||
Line 544: | Line 538: | ||
**** | **** | ||
- | mysql --user=' | + | |
==== Reapply Permissions ==== | ==== Reapply Permissions ==== | ||
- | mysql --user=' | + | |
GRANT ALL PRIVILEGES ON joomla.* to ' | GRANT ALL PRIVILEGES ON joomla.* to ' | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
==== Start Services ==== | ==== Start Services ==== | ||
Line 558: | Line 554: | ||
**** | **** | ||
- | sudo systemctl start nginx php-fpm | + | sudo systemctl start nginx php7.4-fpm |
==== Remove Backups ==== | ==== Remove Backups ==== |
/var/www/wiki/data/pages/servers/nginx/joomla.txt · Last modified: 2024/02/01 08:15 by Sean Rhone