User Tools

Site Tools


servers:linux:nginx_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:linux:nginx_php_php-fpm [2026/07/10 20:53] – [nginx] Sean Rhoneservers:linux:nginx_php_php-fpm [2026/11/18 14:10] (current) – Sean Rhone
Line 42: Line 42:
  
   sudo mv -fv '/etc/php8/fpm/php-fpm.d/www.conf' '/etc/php8/fpm/php-fpm.d/www.conf~'   sudo mv -fv '/etc/php8/fpm/php-fpm.d/www.conf' '/etc/php8/fpm/php-fpm.d/www.conf~'
 +
 +  sudo ln -s -f '/dev/null' '/etc/php8/fpm/php-fpm.d/www.conf'
  
 ===== Check Defaults ===== ===== Check Defaults =====
Line 74: Line 76:
  
   * This automatically redirects non-HTTPS site links to HTTPS   * This automatically redirects non-HTTPS site links to HTTPS
 +  * ''[::]:80'' prevents nginx start with ''ipv6.disable=1''
  
   sudo -e '/etc/nginx/conf.d/http-redirect.conf'   sudo -e '/etc/nginx/conf.d/http-redirect.conf'
Line 80: Line 83:
 server { server {
  listen '80' 'default_server';  listen '80' 'default_server';
- listen '[::]:80' 'default_server';+# listen '[::]:80' 'default_server';
  
  return '301' 'https://$host$request_uri';  return '301' 'https://$host$request_uri';
Line 90: Line 93:
  
   * 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))
 +  * :?: 2026/11/18: [[https://xint.io/blog/nginx2root-remote-code-execution|nginx2root]] (''http2'')
  
   sudo -e '/etc/nginx/conf.d/non-existent.conf'   sudo -e '/etc/nginx/conf.d/non-existent.conf'
Line 96: Line 100:
 server { server {
  listen '443' 'ssl' 'default_server';  listen '443' 'ssl' 'default_server';
- http2 'on';+ http2 'off';
  server_name '_';  server_name '_';
  
Line 178: Line 182:
 <code> <code>
 ssl_certificate '/etc/letsencrypt/live/realmofespionage.xyz/fullchain.pem'; ssl_certificate '/etc/letsencrypt/live/realmofespionage.xyz/fullchain.pem';
-ssl_trusted_certificate '/etc/letsencrypt/live/realmofespionage.xyz/fullchain.pem'; 
 ssl_certificate_key '/etc/letsencrypt/live/realmofespionage.xyz/privkey.pem'; ssl_certificate_key '/etc/letsencrypt/live/realmofespionage.xyz/privkey.pem';
 +ssl_trusted_certificate '/etc/letsencrypt/live/realmofespionage.xyz/fullchain.pem';
  
 ssl_session_timeout '10m'; ssl_session_timeout '10m';
Line 192: Line 196:
  
 # End</code> # End</code>
 +
 +====== Tweaks ======
 +
 +===== PHP =====
 +
 +  echo "export USE_ZEND_ALLOC='0'" | sudo tee '/etc/profile.d/php-tweaks.sh' > '/dev/null'
  
 ====== TODOs ====== ====== TODOs ======
/srv/www/wiki/data/attic/servers/linux/nginx_php_php-fpm.1783731221.txt.gz · Last modified: by Sean Rhone