| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:linux:nginx:friendica [2026/05/15 00:38] – Sean Rhone | servers:linux:nginx:friendica [2026/11/11 01:08] (current) – [FastCGI] Sean Rhone |
|---|
| ===== Prerequisites ===== | ===== Prerequisites ===== |
| |
| * [[linux:distros:server:opensuse_tumbleweed_server|openSUSE Tumbleweed (Server)]] | * [[linux:distros:server:arm:opensuse_tumbleweed_server|openSUSE Tumbleweed (Server)]] |
| * [[servers:linux:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] | * [[servers:linux:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] |
| * [[servers:linux:nginx:lets_encrypt|Certbot (Let's Encrypt)]] | * [[servers:linux:nginx:lets_encrypt|Certbot (Let's Encrypt)]] |
| sudo su 'wwwrun' -s '/bin/bash' | sudo su 'wwwrun' -s '/bin/bash' |
| |
| cd '/tmp' && '/usr/bin/composer' --working-dir='/srv/www/social' --no-cache install --no-dev --ignore-platform-req='ext-apcu' --ignore-platform-req='ext-imagick' | cd '/tmp' && '/usr/bin/php' -c '/etc/php8/cli/social.ini' '/usr/bin/composer' --working-dir='/srv/www/social' --no-cache install --no-dev --ignore-platform-req='ext-apcu' --ignore-platform-req='ext-imagick' |
| |
| exit | exit |
| |
| pm = "ondemand" | pm = "ondemand" |
| pm.max_children = "4" | pm.max_children = "8" |
| pm.process_idle_timeout = "30" | pm.process_idle_timeout = "30" |
| |
| php_value[session.save_path] = "/var/lib/php8/sessions" | php_value[session.save_path] = "/var/lib/php8/sessions" |
| php_value[date.timezone] = "America/New_York" | php_value[date.timezone] = "America/New_York" |
| | |
| php_value[max_execution_time] = "200" | php_value[max_execution_time] = "200" |
| php_value[memory_limit] = "512M" | php_value[memory_limit] = "512M" |
| php_value[upload_max_filesize] = "10M" | php_value[upload_max_filesize] = "10M" |
| php_value[max_file_uploads] = "100" | php_value[max_file_uploads] = "100" |
| | |
| php_value[register_argc_argv] = "On" | php_value[register_argc_argv] = "On" |
| | |
| | ; Temp |
| | php_value[session.upload_progress.enabled] = "0" |
| | |
| | ; End</code> |
| | |
| | ==== CLI ==== |
| | |
| | sudo -e '/etc/php8/cli/social.ini' |
| | |
| | <code> |
| | log_errors = "0" |
| | error_reporting = "~E_ALL" |
| | display_errors = "0" |
| | display_startup_errors = "0" |
| | html_errors = "0" |
| | |
| | session.save_path = "/var/lib/php8/sessions" |
| | date.timezone = "America/New_York" |
| | |
| | max_execution_time = "200" |
| | memory_limit = "512M" |
| | post_max_size = "10M" |
| | upload_max_filesize = "10M" |
| | max_file_uploads = "100" |
| | |
| | register_argc_argv = "On" |
| | |
| | ; Temp |
| | session.upload_progress.enabled = "0" |
| |
| ; End</code> | ; End</code> |
| |
| <code> | <code> |
| location '~' '\.(php|phar)(/.*)?$' { | location '~' '\.(php|phar)(/.*)?$' { |
| fastcgi_split_path_info '^(.+\.(?:php|phar))(/.*)$'; | fastcgi_split_path_info '^(.+\.(?:php|phar))(/.*)$'; |
| 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' '$document_root$fastcgi_script_name'; | fastcgi_param 'SCRIPT_FILENAME' '$document_root$fastcgi_script_name'; |
| fastcgi_param 'PATH_INFO' '$fastcgi_path_info'; | fastcgi_param 'PATH_INFO' '$fastcgi_path_info'; |
| fastcgi_param 'HTTPS' 'on'; | fastcgi_param 'HTTPS' 'on'; |
| fastcgi_pass 'unix:/run/php-fpm/social.sock'; | fastcgi_pass 'unix:/run/php-fpm/social.sock'; |
| } | } |
| |
| # End</code> | # End</code> |
| WorkingDirectory=/tmp | WorkingDirectory=/tmp |
| |
| ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' worker | ExecStart='/usr/bin/php' -c '/etc/php8/fpm/php-fpm.d/social.conf' '/srv/www/social/bin/console.php' worker |
| |
| # End</code> | # End</code> |
| WorkingDirectory=/tmp | WorkingDirectory=/tmp |
| Environment="COMPOSER_CACHE_DIR=/dev/null" | Environment="COMPOSER_CACHE_DIR=/dev/null" |
| | Environment="COMPOSER_DISCARD_CHANGES=true" |
| |
| ExecStart='/usr/bin/git' -C '/srv/www/social' reset --hard 'origin/develop' | ExecStart='/usr/bin/git' -C '/srv/www/social' reset --hard 'origin/develop' |
| ExecStart='/usr/bin/git' -C '/srv/www/social/addon' pull origin 'develop' --rebase | ExecStart='/usr/bin/git' -C '/srv/www/social/addon' pull origin 'develop' --rebase |
| |
| ExecStart='/usr/bin/composer' --working-dir='/srv/www/social' --no-cache install --no-dev --ignore-platform-req='ext-apcu' --ignore-platform-req='ext-imagick' | ExecStart='/usr/bin/php' -c '/etc/php8/fpm/php-fpm.d/social.conf' '/usr/bin/composer' --working-dir='/srv/www/social' --no-cache install --no-interaction --no-dev --ignore-platform-req='ext-apcu' --ignore-platform-req='ext-imagick' |
| |
| ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' dbstructure update --force | ExecStart='/usr/bin/php' -c '/etc/php8/fpm/php-fpm.d/social.conf' '/srv/www/social/bin/console.php' dbstructure update --force |
| ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' dbstructure drop --execute | ExecStart='/usr/bin/php' -c '/etc/php8/fpm/php-fpm.d/social.conf' '/srv/www/social/bin/console.php' dbstructure drop --execute |
| |
| ExecStartPost='/usr/bin/php' '/srv/www/social/bin/console.php' postupdate | ExecStartPost='/usr/bin/php' -c '/etc/php8/fpm/php-fpm.d/social.conf' '/srv/www/social/bin/console.php' postupdate |
| |
| # End</code> | # End</code> |
| ExecStart='/usr/bin/git' -C '/srv/www/social/addon' fsck --full --strict | ExecStart='/usr/bin/git' -C '/srv/www/social/addon' fsck --full --strict |
| |
| ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' cache clear | ExecStart='/usr/bin/php' -c '/etc/php8/fpm/php-fpm.d/social.conf' '/srv/www/social/bin/console.php' cache clear |
| ExecStart='/usr/bin/php' '/srv/www/social/bin/console.php' clearavatarcache | ExecStart='/usr/bin/php' -c '/etc/php8/fpm/php-fpm.d/social.conf' '/srv/www/social/bin/console.php' clearavatarcache |
| |
| # End</code> | # End</code> |