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 09:01] – [logrotate] Sean Rhoneservers:windows:nginx:friendica [2025/10/13 13:30] (current) – [WSL] Sean Rhone
Line 5: Line 5:
   * https://social.realmofespionage.xyz   * https://social.realmofespionage.xyz
  
-  * :!: 2025/10/12: WIP+  * :!: 2025/10/13: WIP ((works; //slowly//))
  
 ===== Prerequisites ===== ===== Prerequisites =====
  
   * [[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" +  "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+
  
 ====== Download Source ====== ====== Download Source ======
Line 56: Line 61:
 ===== PHP ===== ===== PHP =====
  
-  "wsl.exe" +  "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' && sudo systemctl restart 'php-fpm'+
  
 <code> <code>
Line 88: Line 91:
  
 ; End</code> ; End</code>
- 
-  "php.exe" -c "%SystemDrive%\www\php\social.ini" -m 
  
 ===== Composer ===== ===== Composer =====
  
-  "wsl.exe"+****
  
-  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
  
-====== nginx + PHP-CGI Configuration ======+====== nginx + PHP-FPM Configuration ======
  
-===== PHP-CGI =====+===== PHP-FPM =====
  
   "notepad.exe" "%SystemDrive%\www\nginx\default.d\social.conf"   "notepad.exe" "%SystemDrive%\www\nginx\default.d\social.conf"
Line 157: Line 158:
 # End</code> # End</code>
  
-  "%SystemDrive%\www\scripts\nginx Reload.bat" +  "%SystemDrive%\www\scripts\nginx\Reload.bat"
- +
-====== Batch Files ====== +
- +
-  MKDIR "%SystemDrive%\www\scripts\social" +
- +
-  "explorer.exe" "%SystemDrive%\www\scripts\social" +
- +
-===== PHP-CGI ===== +
- +
-  "notepad.exe" "%SystemDrive%\www\scripts\social\PHP-CGI.bat" +
- +
-<code> +
-@echo off +
- +
-START "Social PHP-FPM" "wsl.exe" --distribution openSUSE-Tumbleweed -- php-fpm -c '/etc/php8/fpm/php-fpm.d/social.conf' -F +
- +
-:: End</code> +
- +
-  "%SystemDrive%\www\scripts\social\PHP-CGI.bat" +
- +
-===== logrotate ===== +
- +
-  * Sets ''php-fpm.log'' permissions so ''php-fpm'' can run non-root +
- +
-  "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' +
- +
-<code> +
-'/var/log/php-fpm.log'+
-    create '0640' 'espionage724' 'espionage724' +
-    daily +
-    rotate 0 +
-    nocompress +
-    missingok +
-    notifempty +
-    nocopy +
-    nomail +
-    noshred +
-+
- +
-# End</code> +
- +
-  sudo logrotate --force '/etc/logrotate.d/99-php-fpm.log' +
- +
-  exit +
- +
-==== Autostart ==== +
- +
-  explorer "%ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp" +
- +
-  "%SystemDrive%\www\scripts\social\PHP-CGI.bat" +
- +
-  Social PHP-CGI+
  
 ====== Scripts ====== ====== Scripts ======
Line 219: Line 164:
 ===== Folder ===== ===== Folder =====
  
-  MKDIR "%SystemDrive%\www\scripts\media"+  MKDIR "%SystemDrive%\www\scripts\social"
  
-  "explorer.exe" "%SystemDrive%\www\scripts\media"+  "explorer.exe" "%SystemDrive%\www\scripts\social"
  
-===== PHP-CGI =====+===== PHP-FPM =====
  
-  "notepad.exe" "%SystemDrive%\www\scripts\media\PHP-CGI.bat"+  "notepad.exe" "%SystemDrive%\www\scripts\social\PHP-FPM.bat"
  
 <code> <code>
 @echo off @echo off
  
-SET "PHP_FCGI_MAX_REQUESTS=0" +START "Social PHP-FPM" "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/sbin/php-fpm' -c '/etc/php8/fpm/php-fpm.d/social.conf' -F
-SET "PHP_FCGI_CHILDREN=1" +
- +
-START "Media PHP-CGI" "php-cgi.exe" -b "127.0.0.1:9003" -c "%SystemDrive%\www\php\media.ini" -q+
  
 :: End</code> :: End</code>
  
-  "%SystemDrive%\www\scripts\media\PHP-CGI.bat"+  "%SystemDrive%\www\scripts\social\PHP-FPM.bat"
  
 ===== Update ===== ===== Update =====
Line 345: Line 287:
 ====== Initial Setup ====== ====== Initial Setup ======
  
-  * https://realmofespionage.xyz+  * TODO
  
 ====== Settings ====== ====== Settings ======
  
-  * :!: WIP +  * ''x'' is WSL IP shown on host
-  * [[servers;linux;nginx;joomla#initial_setup]]+
  
-===== Purity III Template =====+  ipconfig
  
-  * [[https://www.joomlart.com/joomla/templates/purity-iii|Purity III]] +  "notepad.exe" "%SystemDrive%\www\social\config\local.config.php"
- +
-==== Install ==== +
- +
-  * [[https://www.joomlart.com/member/downloads/joomlart/free-templates/purity-iii|Downloads]] +
-  * Install T3 Framework and Purity III from that downloads page +
- +
-==== System Dashboard ==== +
- +
-  * Templates -> Site Template Styles +
-  * Set ''purity_III - Default'' to Default +
- +
-==== Theme Settings ==== +
- +
-  * General -> Show T3 Logo: Off +
- +
-  * Theme -> Logo Type: Text +
-  * Theme -> Site Name: ''Realm of Espionage'' +
- +
-  * Navigation -> Megamenu Configuration -> Animation: Fading +
-  * Navigation -> Megamenu Configuration -> Duration: ''300'' +
- +
-  * Add-ons -> Off-canvas Sidebar -> Enable: Off +
- +
-  * Assignment -> Toggle Selection +
- +
-==== Footer ==== +
- +
-=== Copyright === +
- +
-  * Last tested: 2024/02/01 on Joomla 5.1.0-dev, T3 Framework 3.2.0, and Purity III 2.1.0 +
- +
-== Logo == +
- +
-**** +
- +
-  wget -O '/tmp/cc-by-sa-40.png' 'https://licensebuttons.net/l/by-sa/4.0/80x15.png' && sudo mv '/tmp/cc-by-sa-40.png' '/var/www/main/images/cc-by-sa-40.png' && sudo chown 'nginx':'nginx' '/var/www/main/images/cc-by-sa-40.png' && sudo restorecon -F -I -R '/var/www/main/images/cc-by-sa-40.png' && sync +
- +
-== Text == +
- +
-  * Place text within the ''<section class="t3-copyright">'' section underneath the ''Bootstrap by Twitter'' and ''Font Awesome'' mentions +
-  * Remove ''Bootstrap by Twitter'' and ''Font Awesome'' mentions +
- +
-  sudo -e '/var/www/main/templates/purity_iii/tpls/blocks/footer.php' && sudo chown 'nginx':'nginx' '/var/www/main/templates/purity_iii/tpls/blocks/footer.php'+
  
 <code> <code>
-          <small> + 'database' => [ 
-            <img src="https://realmofespionage.xyz/images/cc-by-sa-40.png" width="80" height="15" /All content and data available on Realm of Espionage is available under the <a href="https://creativecommons.org/licenses/by-sa/4.0" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International</a> license. + 'hostname=> 'x',</code>
-          </small></code> +
- +
-==== Custom CSS ==== +
- +
-  * :!: This shrinks the footer height, and places it back at the bottom of the screen instead of floating half-way up the page when little content exists ([[https://www.joomlart.com/forums/topic/footer-on-bottom-of-screen-not-sticky/#post-898349|source 1]], [[https://www.joomlart.com/documentation/joomla-faqs/css-related-issues#footer-sticky|source 2]]) +
-  * Also replaces ThemeMagic for Brand Primary Color, Footer Background, and Footer Text Color +
- +
-  * Last tested: 2024/02/01 on Joomla 5.1.0-dev, T3 Framework 3.2.0, and Purity III 2.1.0 +
- +
-  sudo -e '/var/www/main/templates/purity_iii/css/custom.css&& sudo chown 'nginx':'nginx' '/var/www/main/templates/purity_iii/css/custom.css'+
  
 <code> <code>
-html, + 'system' =[ 
- + 'basepath=> '/mnt/c/www/social',</code>
-body { +
-  height: 100%; +
-+
- +
-a { +
-  color: #3D8BFF; +
-+
- +
-a:hover { +
-  color: #196BE4; +
-+
- +
-.t3-mainnav { +
-  background-color: #3D8BFF; +
-+
- +
-.logo a { +
-  background: none; +
-+
- +
-.logo a:hover { +
-  background: #196BE4; +
-+
- +
-.t3-wrapper { +
-  position: relative; +
-  min-height: 100%; +
-+
- +
-.t3-footer { +
-  position: absolute; +
-  bottom: 0; +
-  left: 0; +
-  right: 0; +
-  background-color: #484848; +
-  color: #FFFFFF; +
-+
- +
-.t3-copyright { +
-  padding-top: 20px; +
-  padding-bottom: 0px; +
-}</code+
- +
-===== Articles ===== +
- +
-==== Home ==== +
- +
-  * The line-breaks are intentional and are there to make how it displays look nicer +
-  * Add links to ''RoE | Wiki'' and ''CC BY-SA 4.0 license'' +
- +
-<code>  +
-  +
- +
-Welcome! Realm of Espionage is a personal project composed of various services. All services on RoE are free and open-sourceself-hosted, and configured with strict security in-mind. My most prominent project currently is RoE | Wiki, a DokuWiki instance that holds my notes on all sorts of operating system, client, and server deployments, free for anyone to view and redistribute under the CC BY-SA 4.0 license. +
- +
-  +
- +
-This domain serves as a landing page and provides links to my most-used profiles and projects. To view them, use the navigation bar (desktop) or the ≡ hamburger icon (mobile) at the top of the screen. +
- +
- </code> +
- +
-===== Menus ===== +
- +
-  * Main menu headers are: System Links -> URL -> ''#'' to allow tapping as-expected on mobile +
-  * Icon sizes are 24x24 +
-  * Menu entries should be named normally before saving for a proper ''alias'', and then add a space on the title afterwards to make it look better with the icon +
- +
-===== Global Configuration ===== +
- +
-==== Site Meta Description ==== +
- +
-**** +
- +
-  Realm of Espionage is a personal project composed of various self-hosted services. All services are hosted in-house under secure conditions, and notes are provided for all services under the CC-BY-SA 4.0 license. +
- +
-==== Content Rights ==== +
- +
-**** +
- +
-  Creative Commons Attribution-ShareAlike 4.0 International +
- +
-==== Articles ==== +
- +
-  * System -> Global Configuration -> Articles +
- +
-  * Show Title: Hide +
-  * Show Category: Hide +
-  * Show Author: Hide +
-  * Show Publish Date: Hide +
-  * Show Navigation: Hide +
-  * Show Print: Hide +
-  * Show Email: Hide +
-  * Show Hits: Hide +
- +
-==== Menu ==== +
- +
-  * Menus -> Main Menu -> Home -> Link Type -> Display in Menu: No +
-  * Menus -> Main Menu -> Home -> Page Display -> Show Page Heading: Hide+
  
 ====== Files ====== ====== Files ======
Line 538: Line 328:
  
   "%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "friendica" < "%UserProfile%\Downloads\friendica.sql"   "%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "friendica" < "%UserProfile%\Downloads\friendica.sql"
 +
 +====== TODO ======
 +
 +  "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' '/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
  
/srv/www/wiki/data/attic/servers/windows/nginx/friendica.1760360508.txt.gz · Last modified: by Sean Rhone