servers:nginx:wordpress
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:wordpress [2019/10/24 13:23] – Switch back to Ubuntu Server Sean Rhone | servers:nginx:wordpress [2021/06/14 11:42] – Fedora Sean Rhone | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | * [[distros:ubuntu_server|Ubuntu Server]] | + | * [[distros:fedora_workstation_gnome# |
* [[servers: | * [[servers: | ||
* [[servers: | * [[servers: | ||
Line 20: | Line 20: | ||
**** | **** | ||
- | sudo git clone --branch ' | + | sudo git clone --branch ' |
+ | |||
+ | ===== SELinux ===== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo semanage fcontext | ||
====== Database ====== | ====== Database ====== | ||
Line 38: | Line 44: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
[blog] | [blog] | ||
- | user = www-data | + | user = nginx |
- | group = www-data | + | group = nginx |
- | listen = / | + | listen = /run/php-fpm/ |
- | listen.owner = www-data | + | listen.owner = nginx |
- | listen.group = www-data | + | listen.group = nginx |
listen.allowed_clients = 127.0.0.1 | listen.allowed_clients = 127.0.0.1 | ||
- | pm = dynamic | + | pm = ondemand |
- | pm.max_children = 8 | + | pm.max_children = 4 |
- | pm.start_servers | + | pm.process_idle_timeout |
- | pm.min_spare_servers = 2 | + | |
- | pm.max_spare_servers = 4 | + | |
php_value[date.timezone] = " | php_value[date.timezone] = " | ||
Line 66: | Line 70: | ||
php_value[session.save_handler] = " | php_value[session.save_handler] = " | ||
- | 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] = "/ | ||
Line 72: | Line 76: | ||
===== FastCGI ===== | ===== FastCGI ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 84: | Line 88: | ||
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:/ |
}</ | }</ | ||
Line 91: | Line 95: | ||
* :!: '' | * :!: '' | ||
- | sudo -e '/ | + | |
< | < | ||
Line 100: | Line 104: | ||
index ' | index ' | ||
- | include '/ | + | include '/ |
- | include '/ | + | include '/ |
client_max_body_size ' | client_max_body_size ' | ||
Line 120: | Line 124: | ||
} | } | ||
}</ | }</ | ||
- | |||
- | ==== Enable ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo rm -f '/ | ||
====== Initial Setup ====== | ====== Initial Setup ====== | ||
Line 145: | Line 143: | ||
< | < | ||
[Service] | [Service] | ||
- | User=www-data | + | User=nginx |
- | Group=www-data | + | Group=nginx |
Type=oneshot | Type=oneshot | ||
ExecStart='/ | ExecStart='/ | ||
- | ExecStartPost='/ | + | ExecStartPost=' |
==== Timer ==== | ==== Timer ==== | ||
Line 178: | Line 176: | ||
< | < | ||
[Service] | [Service] | ||
- | User=www-data | + | User=nginx |
- | Group=www-data | + | Group=nginx |
Type=oneshot | Type=oneshot | ||
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
- | ExecStartPost='/ | + | ExecStartPost=' |
==== Timer ==== | ==== Timer ==== | ||
Line 216: | Line 214: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStart='/ | + | ExecStart=' |
- | ExecStartPost='/ | + | ExecStartPost=' |
=== Timer === | === Timer === | ||
Line 256: | Line 254: | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
ExecStartPre='/ | ExecStartPre='/ | ||
- | ExecStart='/ | + | ExecStart=' |
- | ExecStart='/ | + | ExecStart=' |
- | ExecStartPost='/ | + | ExecStartPost=' |
=== Timer === | === Timer === | ||
Line 288: | Line 286: | ||
**** | **** | ||
- | sudo systemctl stop nginx php7.2-fpm | + | sudo systemctl stop nginx php-fpm |
==== Backup Folder ==== | ==== Backup Folder ==== | ||
Line 306: | Line 304: | ||
**** | **** | ||
- | sudo systemctl start nginx php7.2-fpm | + | sudo systemctl start nginx php-fpm |
===== Client ===== | ===== Client ===== | ||
Line 314: | Line 312: | ||
**** | **** | ||
- | scp espionage724@192.168.1.153: | + | scp espionage724@192.168.1.152: |
====== Restore ====== | ====== Restore ====== | ||
Line 330: | Line 328: | ||
**** | **** | ||
- | scp ~/' | + | scp ~/' |
==== Remove Files ==== | ==== Remove Files ==== | ||
Line 336: | Line 334: | ||
**** | **** | ||
- | rm -f ~/' | + | rm -f ~/' |
===== Server ===== | ===== Server ===== | ||
Line 344: | Line 342: | ||
**** | **** | ||
- | sudo systemctl stop nginx php7.2-fpm | + | sudo systemctl stop nginx php-fpm |
==== Remove Previous Folder ==== | ==== Remove Previous Folder ==== | ||
Line 356: | Line 354: | ||
**** | **** | ||
- | cd '/ | + | cd '/ |
==== Drop Previous Database ==== | ==== Drop Previous Database ==== | ||
Line 396: | Line 394: | ||
**** | **** | ||
- | sudo systemctl start nginx php7.2-fpm | + | sudo systemctl start nginx php-fpm |
==== Remove Backups ==== | ==== Remove Backups ==== |
/var/www/wiki/data/pages/servers/nginx/wordpress.txt · Last modified: 2024/02/01 10:03 by Sean Rhone