User Tools

Site Tools


servers:nginx:friendica

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
servers:nginx:friendica [2019/12/15 10:32] – [PHP-FPM Socket] Sean Rhoneservers:nginx:friendica [2022/08/16 15:34] Sean Rhone
Line 7: Line 7:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[distros:ubuntu_server|Ubuntu Server]]+  * [[distros:fedora_server|Fedora Server]]
   * [[servers:mariadb|MariaDB]]   * [[servers:mariadb|MariaDB]]
   * [[servers:nginx_php_php-fpm|nginx + PHP + PHP-FPM]]   * [[servers:nginx_php_php-fpm|nginx + PHP + PHP-FPM]]
Line 14: Line 14:
 ====== Download Source ====== ====== Download Source ======
  
-  :!: ''develop'' branch was broken on 2019/06/28+****
  
-  sudo rm -Rf '/var/www/social' && sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica.git' '/var/www/social' && sudo rm -Rf '/var/www/social/addon' && sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/var/www/social/addon' && sudo chown -R 'www-data':'www-data' '/var/www/social' && sync+  sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica.git' '/var/www/social' && sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/var/www/social/addon' && sudo chown -R 'nginx':'nginx' '/var/www/social&& sudo restorecon -F -I -R '/var/www/social' && sync
  
 ====== PHP Dependencies ====== ====== PHP Dependencies ======
Line 22: Line 22:
 **** ****
  
-  cd '/var/www/social' && sudo -u 'www-data' COMPOSER_CACHE_DIR='/dev/null' '/var/www/social/bin/composer.phar' install --no-dev && sync+  cd '/var/www/social' && sudo -u 'nginx' COMPOSER_CACHE_DIR='/dev/null' '/var/www/social/bin/composer.phar' install --no-dev && sync
  
 ====== Database ====== ====== Database ======
Line 40: Line 40:
 ===== PHP-FPM Socket ===== ===== PHP-FPM Socket =====
  
-  sudo -e '/etc/php/7.2/fpm/pool.d/social.conf' && sudo systemctl restart 'php7.2-fpm'+  sudo -e '/etc/php-fpm.d/social.conf' && sudo systemctl restart 'php-fpm'
  
 <code> <code>
 [social] [social]
-user = www-data 
-group = www-data 
  
-listen = /run/php/social.sock +; User/Group 
-listen.owner www-data +user = nginx 
-listen.group = www-data+group = nginx 
 + 
 +; Socket 
 +listen = /run/php-fpm/social.sock 
 +listen.acl_users nginx
 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 30
-pm.max_spare_servers = 4+
  
-php_value[date.timezone] = "America/New_York+; Fedora php.ini Defaults 
-php_value[upload_tmp_dir] = "/tmp"+php_value[session.save_handler] = "files
 +php_value[session.save_path] = "/var/lib/php/session"
  
 +; General
 +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"
Line 67: Line 71:
 php_value[max_file_uploads] = "100" php_value[max_file_uploads] = "100"
  
-php_value[session.save_handler] = "files" +; End</code>
-php_value[session.save_path] = "/var/lib/php/sessions" +
-php_value[soap.wsdl_cache_dir] = "/var/lib/php/wsdlcache" +
-php_value[opcache.file_cache] = "/var/lib/php/opcache"</code>+
  
 ===== FastCGI ===== ===== FastCGI =====
  
-  sudo -e '/etc/nginx/snippets/social.conf'+  sudo -e '/etc/nginx/default.d/social.conf'
  
 <code> <code>
Line 82: Line 83:
  
     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_pass unix:/run/php/social.sock;+    fastcgi_pass   unix:/run/php-fpm/social.sock;
 }</code> }</code>
  
 ===== Server Block ===== ===== Server Block =====
  
-  sudo -e '/etc/nginx/sites-available/social.conf'+  sudo -e '/etc/nginx/vhosts.d/social.conf' && sudo systemctl reload 'nginx' && sync
  
 <code> <code>
Line 187: Line 188:
 WorkingDirectory=/var/www/social WorkingDirectory=/var/www/social
 Environment="COMPOSER_CACHE_DIR=/dev/null" Environment="COMPOSER_CACHE_DIR=/dev/null"
-ExecStart='/usr/bin/git' -C '/var/www/social' pull origin 'master+ExecStart='/usr/bin/git' -C '/var/www/social' pull origin 'develop
-ExecStart='/usr/bin/git' -C '/var/www/social/addon' pull origin 'master'+ExecStart='/usr/bin/git' -C '/var/www/social/addon' pull origin 'develop'
 ExecStart='/var/www/social/bin/composer.phar' install --no-dev ExecStart='/var/www/social/bin/composer.phar' install --no-dev
 ExecStartPost='/bin/sync'</code> ExecStartPost='/bin/sync'</code>
Line 331: Line 332:
 **** ****
  
-  sudo systemctl stop nginx php7.2-fpm+  sudo systemctl stop nginx php7.4-fpm
  
 ==== Backup Folder ==== ==== Backup Folder ====
Line 349: Line 350:
 **** ****
  
-  sudo systemctl start nginx php7.2-fpm+  sudo systemctl start nginx php7.4-fpm
  
 ===== Client ===== ===== Client =====
Line 387: Line 388:
 **** ****
  
-  sudo systemctl stop nginx php7.2-fpm+  sudo systemctl stop nginx php7.4-fpm
  
 ==== Remove Previous Folder ==== ==== Remove Previous Folder ====
Line 439: Line 440:
 **** ****
  
-  sudo systemctl start nginx php7.2-fpm+  sudo systemctl start nginx php7.4-fpm
  
 ==== Remove Backups ==== ==== Remove Backups ====
/var/www/wiki/data/pages/servers/nginx/friendica.txt · Last modified: 2024/02/01 08:29 by Sean Rhone