servers:nginx:friendica
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:friendica [2019/10/24 13:40] – Switch back to Ubuntu Server Sean Rhone | servers:nginx:friendica [2019/12/15 10:32] – [PHP-FPM Socket] Sean Rhone | ||
---|---|---|---|
Line 22: | Line 22: | ||
**** | **** | ||
- | cd '/ | + | cd '/ |
====== Database ====== | ====== Database ====== | ||
- | mysql --user=' | + | |
CREATE DATABASE friendica; | CREATE DATABASE friendica; | ||
Line 33: | Line 33: | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
+ | |||
+ | EXIT | ||
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== | ||
Line 38: | Line 40: | ||
===== PHP-FPM Socket ===== | ===== PHP-FPM Socket ===== | ||
- | sudo -e '/ | + | sudo -e '/ |
< | < | ||
[social] | [social] | ||
- | 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 65: | Line 67: | ||
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 84: | Line 86: | ||
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 98: | Line 100: | ||
index ' | index ' | ||
- | include '/ | + | include '/ |
- | include '/ | + | include '/ |
client_max_body_size ' | client_max_body_size ' | ||
Line 125: | Line 127: | ||
} | } | ||
}</ | }</ | ||
+ | |||
+ | ==== Enable ==== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo rm -f '/ | ||
====== Initial Setup ====== | ====== Initial Setup ====== | ||
Line 140: | Line 148: | ||
< | < | ||
[Service] | [Service] | ||
- | User=nginx | + | User=www-data |
- | Group=nginx | + | Group=www-data |
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
ExecStart='/ | ExecStart='/ | ||
- | ExecStartPost=' | + | ExecStartPost='/ |
==== Timer ==== | ==== Timer ==== | ||
* Every 5 minutes | * Every 5 minutes | ||
- | * :!: Refer to [[distros: | ||
sudo -e '/ | sudo -e '/ | ||
Line 170: | Line 177: | ||
==== Service ==== | ==== Service ==== | ||
- | |||
- | * :!: Refer to [[distros: | ||
sudo -e '/ | sudo -e '/ | ||
Line 177: | Line 182: | ||
< | < | ||
[Service] | [Service] | ||
- | User=nginx | + | User=www-data |
- | Group=nginx | + | Group=www-data |
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
Line 185: | Line 190: | ||
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
- | ExecStartPost=' | + | ExecStartPost='/ |
==== Timer ==== | ==== Timer ==== | ||
Line 214: | Line 219: | ||
< | < | ||
[Service] | [Service] | ||
- | User=nginx | + | User=www-data |
- | Group=nginx | + | Group=www-data |
Type=oneshot | Type=oneshot | ||
ExecStart='/ | ExecStart='/ | ||
Line 221: | Line 226: | ||
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
- | ExecStartPost=' | + | ExecStartPost='/ |
==== Timer ==== | ==== Timer ==== | ||
Line 254: | Line 259: | ||
Type=oneshot | Type=oneshot | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
- | ExecStart=' | + | ExecStart='/ |
- | ExecStartPost=' | + | ExecStartPost='/ |
=== Timer === | === Timer === | ||
Line 294: | Line 299: | ||
WorkingDirectory=/ | WorkingDirectory=/ | ||
ExecStartPre='/ | ExecStartPre='/ | ||
- | ExecStart=' | + | ExecStart='/ |
- | ExecStart=' | + | ExecStart='/ |
- | ExecStartPost=' | + | ExecStartPost='/ |
=== Timer === | === Timer === | ||
Line 326: | Line 331: | ||
**** | **** | ||
- | sudo systemctl stop nginx php-fpm | + | sudo systemctl stop nginx php7.2-fpm |
==== Backup Folder ==== | ==== Backup Folder ==== | ||
Line 338: | Line 343: | ||
**** | **** | ||
- | sudo -u ' | + | sudo mysqldump --defaults-extra-file='/ |
==== Start Services ==== | ==== Start Services ==== | ||
Line 344: | Line 349: | ||
**** | **** | ||
- | sudo systemctl start nginx php-fpm | + | sudo systemctl start nginx php7.2-fpm |
===== Client ===== | ===== Client ===== |
/var/www/wiki/data/pages/servers/nginx/friendica.txt · Last modified: 2024/02/01 08:29 by Sean Rhone