User Tools

Site Tools


servers:windows: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
servers:windows:nginx:friendica [2025/10/13 10:04] Sean Rhoneservers:windows:nginx:friendica [2025/10/13 13:30] (current) – [WSL] Sean Rhone
Line 10: Line 10:
  
   * [[windows;11_ltsc_server|Windows 11 (24H2)]]   * [[windows;11_ltsc_server|Windows 11 (24H2)]]
-  * [[servers;windows;nginx_php_php-cgi|nginx + PHP + PHP-CGI]]+  * [[servers;windows;nginx_php_php-cgi|nginx]]
   * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]]   * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]]
   * [[programs;windows;git|Git]]   * [[programs;windows;git|Git]]
   * [[servers;windows;mariadb|MariaDB]]   * [[servers;windows;mariadb|MariaDB]]
 +
 +==== WSL ====
 +
 +  * [[windows;notes;wsl|WSL]]
 +  * [[windows;opensuse_tumbleweed_wsl|openSUSE Tumbleweed]]
 +  * [[servers;windows;php_php-fpm_wsl|PHP + PHP-FPM]]
  
 ====== Dependencies ====== ====== Dependencies ======
Line 19: Line 25:
   * https://friendi.ca/resources/requirements/   * https://friendi.ca/resources/requirements/
   * https://wiki.friendi.ca/docs/install#requirements   * https://wiki.friendi.ca/docs/install#requirements
 +  * 2025/10/13: ''php-posix'' is required ((no known alternative on Windows, hence WSL))
  
-  "wsl.exe" --distribution openSUSE-Tumbleweed +  "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- zypper install --no-confirm php-composer2 php8-curl php8-fileinfo php-gd php8-gmp php8-pdo php8-mbstring php8-intl php8-mysql php8-zip php8-openssl php8-posix php8-opcache
- +
-  sudo zypper install php-composer2 php8-curl php8-fileinfo php-gd php8-gmp php8-pdo php8-mbstring php8-intl php8-mysql php8-zip php8-openssl php8-posix php8-opcache +
- +
-  exit+
  
 ====== Download Source ====== ====== Download Source ======
Line 58: Line 61:
 ===== PHP ===== ===== PHP =====
  
-  "wsl.exe" --distribution openSUSE-Tumbleweed +  "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- nano '/etc/php8/fpm/php-fpm.d/social.conf'
- +
-  sudo -'/etc/php8/fpm/php-fpm.d/social.conf'+
  
 <code> <code>
Line 93: Line 94:
 ===== Composer ===== ===== Composer =====
  
-  "wsl.exe" --distribution openSUSE-Tumbleweed+****
  
-  cd '/tmp' && '/usr/bin/composer' --working-dir='/mnt/c/www/social' --no-cache install --no-dev+  "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/bin/composer' --working-dir='/mnt/c/www/social' --no-cache install --no-dev
  
-  exit+====== nginx + PHP-FPM Configuration ======
  
-====== nginx + PHP-CGI Configuration ====== +===== PHP-FPM =====
- +
-===== PHP-CGI =====+
  
   "notepad.exe" "%SystemDrive%\www\nginx\default.d\social.conf"   "notepad.exe" "%SystemDrive%\www\nginx\default.d\social.conf"
Line 181: Line 180:
  
   "%SystemDrive%\www\scripts\social\PHP-FPM.bat"   "%SystemDrive%\www\scripts\social\PHP-FPM.bat"
- 
-==== logrotate ==== 
- 
-  * Sets ''php-fpm.log'' permissions so ''php-fpm'' can run non-root 
-  * TODO: Put under separate PHP-FPM conf page 
- 
-  "wsl.exe" --distribution openSUSE-Tumbleweed 
- 
-  sudo rm -f '/var/log/php-fpm.log' && echo 'x' | sudo tee '/var/log/php-fpm.log' > '/dev/null' 
- 
-  sudo -e '/etc/logrotate.d/99-php-fpm.log' && sudo sed -i 's/'CHANGEME'/'$USER'/g' '/etc/logrotate.d/99-php-fpm.log' 
- 
-<code> 
-'/var/log/php-fpm.log' { 
-    create '0640' 'CHANGEME' 'CHANGEME' 
-    daily 
-    rotate 0 
-    nocompress 
-    missingok 
-    notifempty 
-    nocopy 
-    nomail 
-    noshred 
-} 
- 
-# End</code> 
- 
-  sudo logrotate --force '/etc/logrotate.d/99-php-fpm.log' 
- 
-  exit 
  
 ===== Update ===== ===== Update =====
Line 322: Line 291:
 ====== Settings ====== ====== Settings ======
  
-  * TODO+  * ''x'' is WSL IP shown on host 
 + 
 +  ipconfig 
 + 
 +  "notepad.exe" "%SystemDrive%\www\social\config\local.config.php" 
 + 
 +<code> 
 + 'database' => [ 
 + 'hostname' => 'x',</code> 
 + 
 +<code> 
 + 'system' => [ 
 + 'basepath' => '/mnt/c/www/social',</code>
  
 ====== Files ====== ====== Files ======
Line 352: Line 333:
   "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/sbin/php-fpm' -c '/etc/php8/fpm/php-fpm.d/social.conf' -F   "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/sbin/php-fpm' -c '/etc/php8/fpm/php-fpm.d/social.conf' -F
  
-  "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/bin/php' '/srv/www/social/bin/console.php' worker+  "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/bin/php' '/mnt/c/www/social/bin/console.php' worker
  
   "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/bin/composer' --working-dir='/mnt/c/www/social' --no-cache install --no-dev   "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/bin/composer' --working-dir='/mnt/c/www/social' --no-cache install --no-dev
  
/srv/www/wiki/data/attic/servers/windows/nginx/friendica.1760364297.txt.gz · Last modified: by Sean Rhone