servers:nginx:wordpress
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
servers:nginx:wordpress [2021/06/14 11:42] – Fedora Sean Rhone | servers:nginx:wordpress [2024/02/01 10:03] (current) – Sean Rhone | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | * [[distros:fedora_workstation_gnome# | + | * [[distros:fedora_server|Fedora |
* [[servers: | * [[servers: | ||
* [[servers: | * [[servers: | ||
Line 14: | Line 14: | ||
===== Notes ===== | ===== Notes ===== | ||
- | * :!: Do not initiate any updates from the Admin/ | + | * :!: Do not initiate any updates from the Admin/ |
- | ====== | + | ====== |
- | **** | + | |
+ | | ||
- | sudo git clone --branch ' | + | sudo dnf install php-mysqlnd php-xml php-pecl-igbinary php-imagick php-intl php-mbstring php-pecl-zip php-sodium php-bcmath php-gd php-process |
- | ===== SELinux | + | ====== Download Source ====== |
**** | **** | ||
- | sudo semanage fcontext --add --type 'httpd_sys_content_t' | + | |
====== Database ====== | ====== Database ====== | ||
- | sudo mysql | + | sudo mariadb |
CREATE DATABASE wordpress; | CREATE DATABASE wordpress; | ||
Line 48: | Line 49: | ||
< | < | ||
[blog] | [blog] | ||
+ | |||
+ | ; 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 | ||
+ | ; Process Management | ||
pm = ondemand | pm = ondemand | ||
pm.max_children = 4 | pm.max_children = 4 | ||
pm.process_idle_timeout = 30 | pm.process_idle_timeout = 30 | ||
- | php_value[date.timezone] = "America/ | + | ; Fedora php.ini Defaults |
- | php_value[upload_tmp_dir] = "/tmp" | + | php_value[session.save_handler] = "files" |
+ | php_value[session.save_path] = "/var/ | ||
+ | ; General | ||
+ | php_value[date.timezone] = " | ||
php_value[max_execution_time] = " | php_value[max_execution_time] = " | ||
php_value[memory_limit] = " | php_value[memory_limit] = " | ||
Line 69: | Line 76: | ||
php_value[max_file_uploads] = " | php_value[max_file_uploads] = " | ||
- | php_value[session.save_handler] = " | + | ; End</code> |
- | php_value[session.save_path] = "/var/ | + | |
- | php_value[soap.wsdl_cache_dir] = "/ | + | < |
- | php_value[opcache.file_cache] = "/var/ | + | php_value[upload_tmp_dir] = "/tmp"</ |
===== FastCGI ===== | ===== FastCGI ===== | ||
Line 82: | Line 89: | ||
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 93: | Line 99: | ||
===== Server Block ===== | ===== Server Block ===== | ||
- | * :!: '' | + | * 2023/09/12: CSPs disabled; TODO: Re-figure out CSPs |
sudo -e '/ | sudo -e '/ | ||
Line 109: | Line 115: | ||
client_max_body_size ' | client_max_body_size ' | ||
- | | + | # |
- | # access_log | + | # access_log |
- | # error_log | + | # error_log |
location / { | location / { | ||
Line 185: | Line 191: | ||
==== Timer ==== | ==== Timer ==== | ||
- | * '' | + | * '' |
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 214: | Line 220: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
=== Timer === | === Timer === | ||
- | * '' | + | * '' |
sudo -e '/ | sudo -e '/ | ||
Line 228: | Line 234: | ||
[Timer] | [Timer] | ||
- | OnCalendar=*-*-01 04:50:00 | + | OnCalendar=*-*-01 04:35:00 |
Persistent=true | Persistent=true | ||
Line 238: | Line 244: | ||
=== Database Auth === | === Database Auth === | ||
- | sudo -u ' | + | sudo mkdir -p '/var/lib/mysql/auth' |
< | < | ||
- | [mysqldump] | + | [mariadb-dump] |
user=wordpress | user=wordpress | ||
password=x</ | password=x</ | ||
Line 247: | Line 253: | ||
=== Service === | === Service === | ||
- | mkdir -p ~/' | + | mkdir -p ~/' |
< | < | ||
Line 253: | Line 259: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStartPre='/ | + | ExecStartPre='/ |
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
Line 260: | Line 266: | ||
=== Timer === | === Timer === | ||
- | * Every day at '' | + | * Every day at '' |
sudo -e '/ | sudo -e '/ | ||
Line 270: | Line 276: | ||
[Timer] | [Timer] | ||
- | OnCalendar=*-*-* 04:15:00 | + | OnCalendar=*-*-* 04:45:00 |
Persistent=true | Persistent=true | ||
Line 298: | Line 304: | ||
**** | **** | ||
- | sudo mysqldump | + | sudo mariadb-dump |
==== Start Services ==== | ==== Start Services ==== | ||
Line 354: | Line 360: | ||
**** | **** | ||
- | cd '/ | + | cd '/ |
==== Drop Previous Database ==== | ==== Drop Previous Database ==== | ||
- | sudo mysql | + | sudo mariadb |
DROP DATABASE wordpress; | DROP DATABASE wordpress; | ||
Line 368: | Line 374: | ||
==== Re-create Databases ==== | ==== Re-create Databases ==== | ||
- | sudo mysql | + | sudo mariadb |
CREATE DATABASE wordpress; | CREATE DATABASE wordpress; | ||
Line 378: | Line 384: | ||
**** | **** | ||
- | sudo mysql ' | + | sudo mariadb |
==== Reapply Permissions ==== | ==== Reapply Permissions ==== | ||
- | sudo mysql | + | sudo mariadb |
GRANT ALL PRIVILEGES ON wordpress.* to ' | GRANT ALL PRIVILEGES ON wordpress.* to ' | ||
Line 401: | Line 407: | ||
rm ~/' | rm ~/' | ||
+ |
/var/www/wiki/data/pages/servers/nginx/wordpress.txt · Last modified: 2024/02/01 10:03 by Sean Rhone