windows:servers:nginx_php_php-cgi
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
windows:servers:nginx_php_php-cgi [2024/06/27 20:43] – Sean Rhone | windows:servers:nginx_php_php-cgi [2024/08/13 18:41] (current) – removed Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Information ====== | ||
- | |||
- | * nginx ((https:// | ||
- | * PHP + PHP-CGI((https:// | ||
- | * [[Information: | ||
- | |||
- | ===== Prerequisites ===== | ||
- | |||
- | * [[windows: | ||
- | |||
- | ===== Resources ===== | ||
- | |||
- | * https:// | ||
- | * https:// | ||
- | * https:// | ||
- | * https:// | ||
- | * https:// | ||
- | |||
- | ====== Install ====== | ||
- | |||
- | ===== nginx ===== | ||
- | |||
- | * https:// | ||
- | |||
- | * Extract to '' | ||
- | |||
- | ===== PHP-CGI ===== | ||
- | |||
- | * https:// | ||
- | * x64 Non Thread Safe | ||
- | |||
- | * Extract to '' | ||
- | |||
- | ===== PHP Extensions ===== | ||
- | |||
- | ==== Verify Modules ==== | ||
- | |||
- | " | ||
- | |||
- | C: | ||
- | |||
- | ====== Firewall ====== | ||
- | |||
- | * 80/tcp is HTTP | ||
- | * 443/tcp is HTTPS | ||
- | |||
- | netsh advfirewall firewall add rule name=" | ||
- | |||
- | netsh advfirewall firewall add rule name=" | ||
- | |||
- | ====== nginx Settings ====== | ||
- | |||
- | ===== Notes ===== | ||
- | |||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | MKDIR " | ||
- | |||
- | MKDIR " | ||
- | |||
- | MKDIR " | ||
- | |||
- | ===== HTTPS Redirect ===== | ||
- | |||
- | * This automatically redirects non-HTTPS site links to HTTPS | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | server { | ||
- | listen 80 default_server; | ||
- | listen [::]:80 default_server; | ||
- | |||
- | return 301 https:// | ||
- | }</ | ||
- | |||
- | ===== Non-existent 404 ===== | ||
- | |||
- | * This prevents unconfigured subdomains from loading assets from other sites ((if a site/URL doesn' | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | server { | ||
- | listen " | ||
- | server_name " | ||
- | |||
- | return " | ||
- | }</ | ||
- | |||
- | ===== Headers ===== | ||
- | |||
- | * Last updated: 2024/02/07 | ||
- | * Add to individual site configs as an '' | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | add_header Strict-Transport-Security " | ||
- | add_header X-Content-Type-Options " | ||
- | add_header X-Frame-Options " | ||
- | add_header X-XSS-Protection "1; mode=block" | ||
- | add_header Cache-Control " | ||
- | add_header Referrer-Policy " | ||
- | add_header Expect-CT " | ||
- | add_header Permissions-Policy " | ||
- | |||
- | ===== nginx ===== | ||
- | |||
- | * Last updated: 2024/06/21 | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | worker_processes | ||
- | |||
- | events { | ||
- | worker_connections | ||
- | } | ||
- | |||
- | # | ||
- | # | ||
- | # | ||
- | |||
- | http { | ||
- | |||
- | # Logging | ||
- | # | ||
- | # ' | ||
- | # '" | ||
- | |||
- | # | ||
- | |||
- | # Includes | ||
- | include C:/ | ||
- | include C:/ | ||
- | include mime.types; | ||
- | default_type application/ | ||
- | |||
- | # Config | ||
- | sendfile on; | ||
- | tcp_nopush on; | ||
- | tcp_nodelay on; | ||
- | keepalive_timeout 65; | ||
- | types_hash_max_size 4096; | ||
- | server_names_hash_bucket_size 64; | ||
- | |||
- | # gzip | ||
- | gzip on; | ||
- | gzip_vary on; | ||
- | gzip_proxied any; | ||
- | gzip_comp_level 9; | ||
- | gzip_types *; | ||
- | }</ | ||
- | |||
- | ==== CSP Headers ==== | ||
- | |||
- | * The empty CSP allows all and can be useful for new site bring-ups, and should be placed in site-specific configs underneath the '' | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | |||
- | ====== SSL Certs ====== | ||
- | |||
- | ===== Let's Encrypt ===== | ||
- | |||
- | * See [[windows; | ||
- | |||
- | ==== Settings ==== | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | ssl_certificate " | ||
- | ssl_trusted_certificate " | ||
- | ssl_certificate_key " | ||
- | |||
- | ssl_session_timeout " | ||
- | ssl_session_cache " | ||
- | ssl_session_tickets " | ||
- | ssl_buffer_size " | ||
- | |||
- | ssl_protocols " | ||
- | ssl_ciphers " | ||
- | ssl_prefer_server_ciphers " | ||
- | ssl_ecdh_curve " | ||
- | |||
- | ssl_stapling " | ||
- | ssl_stapling_verify " | ||
- | resolver " | ||
- | resolver_timeout " | ||
- | |||
- | # End</ | ||
- | |||
- | ====== Batch Files ====== | ||
- | |||
- | ===== Start ===== | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | CD " | ||
- | " | ||
- | |||
- | " | ||
- | |||
- | ===== Stop ===== | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | cd " | ||
- | " | ||
- | |||
- | " | ||
- | |||
- | ===== Reload ===== | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | cd " | ||
- | " | ||
- | " | ||
- | |||
- | %UserProfile%\Desktop\nginx Reload.bat" | ||
- | |||
- | ===== Autostart ===== | ||
- | |||
- | notepad++ " | ||
- | |||
- | < | ||
- | CD " | ||
- | " | ||
- | |||
- | explorer " | ||
/usr/local/www/wiki/data/attic/windows/servers/nginx_php_php-cgi.1719535424.txt.gz · Last modified: by Sean Rhone