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 [2019/06/29 00:43] – [Service] Sean Rhone | servers:nginx:friendica [2023/09/12 20:09] – Sean Rhone | ||
---|---|---|---|
Line 8: | Line 8: | ||
* [[distros: | * [[distros: | ||
- | * [[servers: | + | * [[servers: |
- | * [[servers: | + | * [[servers: |
- | * [[servers: | + | * [[servers: |
- | ====== | + | ====== |
- | * :!: '' | + | * https://friendi.ca/ |
- | sudo rm -Rf '/ | + | sudo dnf install php-gd php-pdo php-mbstring php-mysqlnd php-xml php-pecl-zip php-process php-gmp php-pecl-xdebug3 |
- | ===== SELinux | + | ====== Download Source ====== |
- | sudo semanage fcontext --deleteall "/ | + | **** |
- | sudo semanage fcontext --add --type ' | + | |
- | + | ||
- | | + | |
====== PHP Dependencies ====== | ====== PHP Dependencies ====== | ||
- | **** | + | |
- | cd '/ | + | |
+ | |||
+ | | ||
====== Database ====== | ====== Database ====== | ||
- | | + | |
CREATE DATABASE friendica; | CREATE DATABASE friendica; | ||
Line 41: | Line 41: | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== | ||
Line 50: | Line 52: | ||
< | < | ||
[social] | [social] | ||
+ | |||
+ | ; 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 | + | |
- | 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 72: | Line 78: | ||
php_value[upload_max_filesize] = " | php_value[upload_max_filesize] = " | ||
php_value[max_file_uploads] = " | php_value[max_file_uploads] = " | ||
+ | php_value[register_argc_argv] = " | ||
+ | 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 86: | 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 index.php; | fastcgi_index index.php; | ||
Line 93: | Line 97: | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_pass unix:/ | fastcgi_pass unix:/ | ||
+ | }</ | ||
+ | |||
+ | ==== Test ==== | ||
+ | |||
+ | < | ||
+ | # PHP-FPM | ||
+ | location ~* \.php$ { | ||
+ | # fastcgi_intercept_errors on; | ||
+ | # fastcgi_param PATH_INFO $fastcgi_path_info; | ||
+ | fastcgi_pass unix:/ | ||
+ | fastcgi_buffers 8 16k; | ||
+ | fastcgi_buffer_size 32k; | ||
+ | fastcgi_connect_timeout 60; | ||
+ | fastcgi_send_timeout 300; | ||
+ | fastcgi_read_timeout 300; | ||
+ | fastcgi_split_path_info ^(.+? | ||
+ | try_files $uri =404; | ||
+ | fastcgi_index index.php; | ||
+ | include fastcgi_params; | ||
+ | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
}</ | }</ | ||
===== Server Block ===== | ===== Server Block ===== | ||
- | sudo -e '/ | + | |
+ | |||
+ | | ||
< | < | ||
Line 111: | Line 137: | ||
client_max_body_size ' | client_max_body_size ' | ||
- | | + | # |
# access_log | # access_log | ||
Line 135: | Line 161: | ||
====== Initial Setup ====== | ====== Initial Setup ====== | ||
+ | |||
+ | ===== Initialize ===== | ||
+ | |||
+ | * :!: Change '' | ||
+ | |||
+ | sudo su ' | ||
+ | |||
+ | cd '/ | ||
+ | |||
+ | ===== 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 159: | Line 218: | ||
* Every 5 minutes | * Every 5 minutes | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 187: | Line 246: | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
Environment=" | Environment=" | ||
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
Line 232: | Line 291: | ||
* '' | * '' | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
Line 259: | Line 318: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStart='/ | + | ExecStart='/ |
ExecStartPost='/ | ExecStartPost='/ | ||
Line 283: | Line 342: | ||
=== Database Auth === | === Database Auth === | ||
- | sudo -u ' | + | sudo mkdir -p '/var/lib/mysql/auth' |
< | < | ||
- | [mysqldump] | + | [mariadb-dump] |
user=friendica | user=friendica | ||
password=x</ | password=x</ | ||
Line 298: | Line 357: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStartPre='/ | + | ExecStartPre='/ |
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
Line 343: | Line 402: | ||
**** | **** | ||
- | sudo -u ' | + | sudo mariadb-dump --defaults-extra-file='/ |
==== Start Services ==== | ==== Start Services ==== | ||
Line 357: | Line 416: | ||
**** | **** | ||
- | scp espionage724@192.168.1.153: | + | scp espionage724@192.168.1.152: |
====== Restore ====== | ====== Restore ====== | ||
Line 373: | Line 432: | ||
**** | **** | ||
- | scp ~/' | + | scp ~/' |
==== Remove Files ==== | ==== Remove Files ==== | ||
Line 395: | Line 454: | ||
sudo rm -Rf '/ | sudo rm -Rf '/ | ||
- | ==== Restore | + | ==== Restore |
**** | **** | ||
- | cd '/ | + | cd '/ |
- | + | ||
- | ==== SELinux ==== | + | |
- | + | ||
- | sudo semanage fcontext --deleteall "/ | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
==== Drop Previous Database ==== | ==== Drop Previous Database ==== | ||
- | | + | |
DROP DATABASE friendica; | DROP DATABASE friendica; | ||
FLUSH TABLES; | FLUSH TABLES; | ||
+ | |||
+ | EXIT | ||
==== Re-create Databases ==== | ==== Re-create Databases ==== | ||
- | | + | |
CREATE DATABASE friendica; | CREATE DATABASE friendica; | ||
+ | |||
+ | EXIT | ||
==== Restore Database ==== | ==== Restore Database ==== | ||
Line 427: | Line 482: | ||
**** | **** | ||
- | | + | |
==== Reapply Permissions ==== | ==== Reapply Permissions ==== | ||
- | | + | |
GRANT ALL PRIVILEGES ON friendica.* to ' | GRANT ALL PRIVILEGES ON friendica.* to ' | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
==== Start Services ==== | ==== Start Services ==== | ||
Line 445: | 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