User Tools

Site Tools


servers:bsd:freenginx_php_php-fpm

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:bsd:freenginx_php_php-fpm [2024/11/30 11:28] – [Let's Encrypt] Sean Rhoneservers:bsd:freenginx_php_php-fpm [2024/12/12 21:12] (current) – A+ Sean Rhone
Line 2: Line 2:
  
   * freenginx ((https://freenginx.org/))   * freenginx ((https://freenginx.org/))
-  * PHP+  * PHP 8.4
   * PHP-FPM   * PHP-FPM
   * [[Information:Realm of Espionage]]   * [[Information:Realm of Espionage]]
 +
 +  * :!: WIP
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 24: Line 26:
 ====== Dependencies ====== ====== Dependencies ======
  
-  su -l+  su -
  
   pkg install freenginx php84   pkg install freenginx php84
Line 43: Line 45:
  
   sudo firewall-cmd --add-service='http' --permanent && sudo firewall-cmd --add-service='https' --permanent && sudo firewall-cmd --reload   sudo firewall-cmd --add-service='http' --permanent && sudo firewall-cmd --add-service='https' --permanent && sudo firewall-cmd --reload
- 
  
 ====== Services ====== ====== Services ======
Line 49: Line 50:
 ===== Enable ===== ===== Enable =====
  
-  su -l+  su -
  
   sysrc nginx_enable="YES"   sysrc nginx_enable="YES"
Line 65: Line 66:
   sudo mv '/etc/php-fpm.d/www.conf' '/etc/php-fpm.d/www.conf~'   sudo mv '/etc/php-fpm.d/www.conf' '/etc/php-fpm.d/www.conf~'
  
-  sudo mv '/etc/nginx/nginx.conf' '/etc/nginx/nginx.conf~'+  mv -v '/usr/local/etc/nginx/nginx.conf' '/usr/local/etc/nginx/nginx.conf~'
  
 ===== View ===== ===== View =====
Line 75: Line 76:
   nano '/etc/php-fpm.d/www.conf~'   nano '/etc/php-fpm.d/www.conf~'
  
-  nano '/etc/nginx/nginx.conf~'+  ee '/usr/local/etc/nginx/nginx.conf~'
  
   nano '/etc/php.ini'   nano '/etc/php.ini'
Line 85: Line 86:
   * ''conf.d'' contains **server-wide** modular configuration files   * ''conf.d'' contains **server-wide** modular configuration files
   * ''default.d'' contains **site-specific** modular configuration files   * ''default.d'' contains **site-specific** modular configuration files
-  * ''vhosts.d'' contains enabled websites ((this folder needs created))+  * ''vhosts.d'' contains enabled websites
  
 ===== Defaults ===== ===== Defaults =====
  
-==== vhosts.d ====+  su -
  
-**** +  mkdir -p '/usr/local/etc/nginx/conf.d' '/usr/local/etc/nginx/default.d' '/usr/local/etc/nginx/vhosts.d'
- +
-  sudo mkdir -p '/etc/nginx/vhosts.d'+
  
 ===== HTTPS Redirect ===== ===== HTTPS Redirect =====
Line 99: Line 98:
   * This automatically redirects non-HTTPS site links to HTTPS   * This automatically redirects non-HTTPS site links to HTTPS
  
-  sudo -'/etc/nginx/conf.d/http-redirect.conf'+  su - 
 + 
 +  ee '/usr/local/etc/nginx/conf.d/http-redirect.conf'
  
 <code> <code>
Line 113: Line 114:
   * This prevents unconfigured subdomains from loading assets from other sites ((if a site/URL doesn't exist, it'll 404))   * This prevents unconfigured subdomains from loading assets from other sites ((if a site/URL doesn't exist, it'll 404))
  
-  sudo -'/etc/nginx/conf.d/non-existent.conf'+  su - 
 + 
 +  ee '/usr/local/etc/nginx/conf.d/non-existent.conf'
  
 <code> <code>
Line 126: Line 129:
 ===== Headers ===== ===== Headers =====
  
-  * Last updated: 2024/02/07 
   * Add to individual site configs as an ''include''   * Add to individual site configs as an ''include''
  
-  sudo -'/etc/nginx/default.d/headers.conf'+  su - 
 + 
 +  ee '/usr/local/etc/nginx/default.d/headers.conf'
  
 <code> <code>
Line 145: Line 149:
   * Last updated: 2024/11/30   * Last updated: 2024/11/30
  
-  su -l+  su -
  
   ee '/usr/local/etc/nginx/nginx.conf'   ee '/usr/local/etc/nginx/nginx.conf'
Line 203: Line 207:
   * See [[servers:bsd:nginx:lets_encrypt|Let's Encrypt/Certbot]] for further set-up   * See [[servers:bsd:nginx:lets_encrypt|Let's Encrypt/Certbot]] for further set-up
  
-  su -l+  su -
  
   ee '/usr/local/etc/nginx/conf.d/ssl.conf'   ee '/usr/local/etc/nginx/conf.d/ssl.conf'
Line 217: Line 221:
 ssl_buffer_size '4k'; ssl_buffer_size '4k';
  
-ssl_protocols 'TLSv1.3';+ssl_protocols 'TLSv1.2' 'TLSv1.3';
 ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM'; ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM';
 ssl_prefer_server_ciphers 'on'; ssl_prefer_server_ciphers 'on';
/srv/www/wiki/data/attic/servers/bsd/freenginx_php_php-fpm.1732984098.txt.gz · Last modified: by Sean Rhone