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/04/28 20:04] – [Headers] Sean Rhoneservers:linux:nginx_php_php-fpm [2026/07/10 20:53] (current) – [nginx] Sean Rhone
Line 8: Line 8:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  * [[linux:distros:server:opensuse_tumbleweed_server|openSUSE Tumbleweed (Server)]]+  * [[linux:distros:server:arm:opensuse_tumbleweed_server|openSUSE Tumbleweed (Server)]]
  
 ====== Dependencies ====== ====== Dependencies ======
- 
-**** 
  
   sudo zypper install git-core nginx php8-cli php8-fpm   sudo zypper install git-core nginx php8-cli php8-fpm
Line 34: Line 32:
  
   sudo systemctl stop 'nginx' 'php-fpm'   sudo systemctl stop 'nginx' 'php-fpm'
- 
-===== Start ===== 
- 
-  sudo systemctl start 'nginx' 
- 
-  sudo systemctl start 'php-fpm' 
  
 ====== Disable Defaults ====== ====== Disable Defaults ======
Line 45: Line 37:
 ===== nginx ===== ===== nginx =====
  
-**** +  sudo mv -fv '/etc/nginx/nginx.conf' '/etc/nginx/nginx.conf~'
- +
-  sudo mv '/etc/nginx/nginx.conf' '/etc/nginx/nginx.conf~'+
  
 ===== PHP-FPM ===== ===== PHP-FPM =====
  
-**** +  sudo mv -fv '/etc/php8/fpm/php-fpm.d/www.conf' '/etc/php8/fpm/php-fpm.d/www.conf~'
- +
-  sudo mv '/etc/php8/fpm/php-fpm.d/www.conf' '/etc/php8/fpm/php-fpm.d/www.conf~'+
  
 ===== Check Defaults ===== ===== Check Defaults =====
  
 ==== nginx ==== ==== nginx ====
- 
-**** 
  
   nano '/etc/nginx/nginx.conf~'   nano '/etc/nginx/nginx.conf~'
Line 82: Line 68:
  
 ===== Folders ===== ===== Folders =====
- 
-**** 
  
   sudo mkdir -p '/etc/nginx/default.d' '/etc/nginx/vhosts.d'   sudo mkdir -p '/etc/nginx/default.d' '/etc/nginx/vhosts.d'
Line 149: Line 133:
  
 #error_log '/var/log/nginx/error.log'; #error_log '/var/log/nginx/error.log';
 +error_log '/dev/null';
  
 http { http {
- 
- # Logging 
  #log_format main '$time_local - $http_host - $remote_addr - $status "$request" $body_bytes_sent - $http_referer - "$http_user_agent"';  #log_format main '$time_local - $http_host - $remote_addr - $status "$request" $body_bytes_sent - $http_referer - "$http_user_agent"';
  #access_log '/var/log/nginx/access.log main';  #access_log '/var/log/nginx/access.log main';
- 
  access_log '/dev/null';  access_log '/dev/null';
  
- # Includes 
  include '/etc/nginx/conf.d/*.conf';  include '/etc/nginx/conf.d/*.conf';
  include '/etc/nginx/vhosts.d/*.conf';  include '/etc/nginx/vhosts.d/*.conf';
Line 164: Line 145:
  default_type 'application/octet-stream';  default_type 'application/octet-stream';
  
- # Config 
  sendfile 'on';  sendfile 'on';
  tcp_nopush 'on';  tcp_nopush 'on';
Line 171: Line 151:
  types_hash_max_size '4096';  types_hash_max_size '4096';
  
- # gzip 
  gzip 'on';  gzip 'on';
  gzip_vary 'on';  gzip_vary 'on';
Line 185: Line 164:
   * The empty CSP allows all and can be useful for new site bring-ups, and should be placed in site-specific configs underneath the ''include'' line(s)   * The empty CSP allows all and can be useful for new site bring-ups, and should be placed in site-specific configs underneath the ''include'' line(s)
  
-<code>    add_header Content-Security-Policy "default-src 'self'" always;</code>+<code>add_header Content-Security-Policy "default-src 'self'" always;</code>
  
-<code>    add_header Content-Security-Policy "" always;</code>+<code>add_header Content-Security-Policy "" always;</code>
  
 ====== SSL Certs ====== ====== SSL Certs ======
Line 210: Line 189:
 ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM'; ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM';
 ssl_prefer_server_ciphers 'on'; ssl_prefer_server_ciphers 'on';
-ssl_ecdh_curve 'secp384r1';+ssl_ecdh_curve 'secp384r1:SecP384r1MLKEM1024:SecP256r1MLKEM768:X25519MLKEM768';
  
 # End</code> # End</code>
Line 235: Line 214:
   * https://scotthelme.co.uk   * https://scotthelme.co.uk
   * https://mozilla.github.io/server-side-tls/ssl-config-generator   * https://mozilla.github.io/server-side-tls/ssl-config-generator
-  * [[https://www.ssllabs.com/ssltest/analyze.html?d=wiki.realmofespionage.xyz|Qualys SSL Test]] 
   * https://fedoraproject.org/wiki/Nginx   * https://fedoraproject.org/wiki/Nginx
  
/usr/local/www/wiki/data/attic/servers/linux/nginx_php_php-fpm.1777421046.txt.gz · Last modified: by Sean Rhone