servers:nginx:friendica
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
servers:nginx:friendica [2023/09/01 20:12] – Sean Rhone | servers:nginx:friendica [2023/09/12 20:09] – Sean Rhone | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | * [[distros:opensuse_tumbleweed_server|openSUSE Tumbleweed]] | + | * [[distros:fedora_server|Fedora Server]] |
* [[servers: | * [[servers: | ||
* [[servers: | * [[servers: | ||
Line 14: | Line 14: | ||
====== Dependencies ====== | ====== Dependencies ====== | ||
- | **** | + | |
- | sudo zypper | + | sudo dnf install |
====== Download Source ====== | ====== Download Source ====== | ||
Line 22: | Line 22: | ||
**** | **** | ||
- | sudo git clone --branch ' | + | sudo git clone --branch ' |
====== PHP Dependencies ====== | ====== PHP Dependencies ====== | ||
+ | |||
+ | * [[https:// | ||
sudo su ' | sudo su ' | ||
- | cd '/srv/ | + | cd '/var/ |
====== Database ====== | ====== Database ====== | ||
- | sudo mysql | + | sudo mariadb |
CREATE DATABASE friendica; | CREATE DATABASE friendica; | ||
Line 41: | Line 43: | ||
EXIT | EXIT | ||
- | |||
- | sudo mysql ' | ||
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== | ||
Line 48: | Line 48: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/etc/php8/fpm/ | + | sudo -e '/ |
< | < | ||
Line 58: | Line 58: | ||
; Socket | ; Socket | ||
- | listen = 127.0.0.1:9005 | + | listen = / |
listen.acl_users = nginx | listen.acl_users = nginx | ||
listen.allowed_clients = 127.0.0.1 | listen.allowed_clients = 127.0.0.1 | ||
Line 67: | Line 67: | ||
pm.process_idle_timeout = 30 | pm.process_idle_timeout = 30 | ||
- | ; openSUSE TW php.ini Defaults | + | ; Fedora |
- | php_value[session.save_path] = "/ | + | php_value[session.save_handler] = " |
+ | php_value[session.save_path] = "/ | ||
; General | ; General | ||
Line 90: | Line 91: | ||
location ~ \.(php|phar)(/ | location ~ \.(php|phar)(/ | ||
fastcgi_split_path_info ^(.+\.(?: | fastcgi_split_path_info ^(.+\.(?: | ||
- | |||
fastcgi_intercept_errors on; | fastcgi_intercept_errors on; | ||
- | fastcgi_index | + | fastcgi_index index.php; |
- | include | + | include fastcgi_params; |
- | fastcgi_param | + | fastcgi_param SCRIPT_FILENAME |
- | fastcgi_param | + | fastcgi_param PATH_INFO $fastcgi_path_info; |
- | fastcgi_pass | + | fastcgi_pass |
}</ | }</ | ||
Line 105: | Line 105: | ||
location ~* \.php$ { | location ~* \.php$ { | ||
# fastcgi_intercept_errors on; | # fastcgi_intercept_errors on; | ||
- | # fastcgi_param | + | # fastcgi_param PATH_INFO $fastcgi_path_info; |
- | fastcgi_pass | + | fastcgi_pass |
fastcgi_buffers 8 16k; | fastcgi_buffers 8 16k; | ||
fastcgi_buffer_size 32k; | fastcgi_buffer_size 32k; | ||
Line 120: | Line 120: | ||
===== Server Block ===== | ===== Server Block ===== | ||
+ | |||
+ | * 2023/09/12: CSPs disabled; TODO: Re-figure out CSPs | ||
sudo -e '/ | sudo -e '/ | ||
Line 127: | Line 129: | ||
listen ' | listen ' | ||
server_name ' | server_name ' | ||
- | root '/srv/ | + | root '/var/ |
index ' | index ' | ||
Line 135: | Line 137: | ||
client_max_body_size ' | client_max_body_size ' | ||
- | | + | # |
# access_log | # access_log | ||
Line 157: | Line 159: | ||
} | } | ||
}</ | }</ | ||
- | |||
- | ==== Test ==== | ||
- | |||
- | < | ||
- | if (!-e $request_filename) { | ||
- | rewrite ^(.*)$ / | ||
- | } | ||
- | |||
- | client_max_body_size 50M; | ||
- | client_body_buffer_size 128k; | ||
- | |||
- | location ^~ / | ||
- | allow all; | ||
- | if (!-e $request_filename) { | ||
- | | ||
- | } | ||
- | }</ | ||
====== Initial Setup ====== | ====== Initial Setup ====== | ||
- | ===== Config | + | ===== Initialize |
* :!: Change '' | * :!: Change '' | ||
Line 183: | Line 168: | ||
sudo su ' | sudo su ' | ||
- | cd '/srv/ | + | cd '/var/ |
===== Website ===== | ===== Website ===== | ||
* https:// | * https:// | ||
+ | * :!: Be sure the email matches what was used on the above command | ||
+ | |||
+ | ===== User ===== | ||
+ | |||
+ | * :!: '' | ||
+ | |||
+ | sudo su ' | ||
+ | |||
+ | cd '/ | ||
+ | |||
+ | ====== Settings ====== | ||
+ | |||
+ | ===== frio Theme ===== | ||
+ | |||
+ | * Navigation bar background color: '' | ||
+ | * Navigation bar icon color: '' | ||
+ | * Link color: '' | ||
+ | * Set the background color: '' | ||
+ | * Login page background color: '' | ||
+ | |||
+ | * Copy or paste schemestring: | ||
+ | |||
+ | < | ||
====== Services ====== | ====== Services ====== | ||
Line 202: | Line 210: | ||
Group=nginx | Group=nginx | ||
Type=oneshot | Type=oneshot | ||
- | WorkingDirectory=/ | + | WorkingDirectory=/ |
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
Line 210: | Line 218: | ||
* Every 5 minutes | * Every 5 minutes | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 236: | Line 244: | ||
Group=nginx | Group=nginx | ||
Type=oneshot | Type=oneshot | ||
- | WorkingDirectory=/ | + | WorkingDirectory=/ |
Environment=" | Environment=" | ||
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
Line 273: | Line 281: | ||
Group=nginx | Group=nginx | ||
Type=oneshot | Type=oneshot | ||
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
Line 283: | Line 291: | ||
* '' | * '' | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 309: | Line 317: | ||
[Service] | [Service] | ||
Type=oneshot | Type=oneshot | ||
- | WorkingDirectory=/ | + | WorkingDirectory=/ |
ExecStart='/ | ExecStart='/ | ||
ExecStartPost='/ | ExecStartPost='/ | ||
Line 337: | Line 345: | ||
< | < | ||
- | [mysqldump] | + | [mariadb-dump] |
user=friendica | user=friendica | ||
password=x</ | password=x</ | ||
Line 349: | Line 357: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStartPre='/ | + | ExecStartPre='/ |
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
Line 388: | Line 396: | ||
**** | **** | ||
- | cd '/srv/www' && sudo tar -cvzf ~/' | + | cd '/var/www' && sudo tar -cvzf ~/' |
==== Backup Database ==== | ==== Backup Database ==== | ||
Line 394: | Line 402: | ||
**** | **** | ||
- | sudo mysqldump | + | sudo mariadb-dump |
==== Start Services ==== | ==== Start Services ==== | ||
Line 444: | Line 452: | ||
**** | **** | ||
- | sudo rm -Rf '/srv/ | + | sudo rm -Rf '/var/ |
- | ==== Restore | + | ==== Restore |
**** | **** | ||
- | cd '/srv/www' && sudo tar -xvzf ~/' | + | cd '/var/www' && sudo tar -xvzf ~/' |
==== Drop Previous Database ==== | ==== Drop Previous Database ==== | ||
- | sudo mysql | + | sudo mariadb |
DROP DATABASE friendica; | DROP DATABASE friendica; | ||
Line 464: | Line 472: | ||
==== Re-create Databases ==== | ==== Re-create Databases ==== | ||
- | sudo mysql | + | sudo mariadb |
CREATE DATABASE friendica; | CREATE DATABASE friendica; | ||
Line 474: | Line 482: | ||
**** | **** | ||
- | sudo mysql ' | + | sudo mariadb |
==== Reapply Permissions ==== | ==== Reapply Permissions ==== | ||
- | sudo mysql | + | sudo mariadb |
GRANT ALL PRIVILEGES ON friendica.* to ' | GRANT ALL PRIVILEGES ON friendica.* to ' | ||
Line 494: | Line 502: | ||
==== Remove Backups ==== | ==== Remove Backups ==== | ||
- | * Verify that friendica | + | * Verify that Friendica |
rm ~/' | rm ~/' | ||
/var/www/wiki/data/pages/servers/nginx/friendica.txt · Last modified: 2024/02/01 08:29 by Sean Rhone