nginx-1.29.0.zip
C:\nginx-1.29.0\nginx.exe
explorer "%SystemDrive%"
CD "%SystemDrive%\nginx-"*"\" && "nginx.exe" -v
MKDIR "%SystemDrive%\www\nginx\conf"
COPY /Y "%SystemDrive%\nginx-1.29.0\conf\fastcgi_params" "%SystemDrive%\www\nginx\conf"
COPY /Y "%SystemDrive%\nginx-1.29.0\conf\mime.types" "%SystemDrive%\www\nginx\conf"
"netsh.exe" advfirewall firewall add rule name="nginx" dir="in" action="allow" profile="any" program="%SystemDrive%\nginx-1.29.0\nginx.exe" protocol="tcp" localport="80,443"
"netsh.exe" advfirewall firewall delete rule name="nginx"
php-8.4.9RC1-nts-Win32-vs17-x64.zip
C:\php-8.4.9RC1-nts-Win32-vs17-x64\php-cgi.exe
Path
explorer "%SystemDrive%"
CD "%SystemDrive%\php-8.4"*"-nts-Win32-"*"-x64\" && "php.exe" -v
"SystemPropertiesAdvanced.exe"
C:\php-8.4.9RC1-nts-Win32-vs17-x64
MKDIR "%SystemDrive%\www\php"
MKDIR "%SystemDrive%\www\nginx\conf.d"
MKDIR "%SystemDrive%\www\nginx\default.d"
MKDIR "%SystemDrive%\www\nginx\vhosts.d"
notepad "%SystemDrive%\www\nginx\conf.d\http-redirect.conf"
server { listen 80 default_server; listen [::]:80 default_server; return 301 https://$host$request_uri; } # End
notepad "%SystemDrive%\www\nginx\conf.d\non-existent.conf"
server { listen "443" "ssl" "default_server"; http2 "on"; server_name "_"; return "404"; } # End
include
notepad "%SystemDrive%\www\nginx\default.d\headers.conf"
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "sameorigin" always; add_header X-XSS-Protection "1; mode=block" always; add_header Cache-Control "no-store, no-transform, public" always; add_header Referrer-Policy "same-origin" always; add_header Expect-CT "max-age=0" always; add_header Permissions-Policy "geolocation=(), microphone=(), payment=(), usb=(), vr=(), magnetometer=(), midi=(), camera=(), ambient-light-sensor=(), accelerometer=()" always; # End
notepad "%SystemDrive%\www\nginx\nginx.conf"
worker_processes 1; events { worker_connections 1024; } #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; http { # Logging #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; # Includes include C:/www/nginx/conf.d/*.conf; include C:/www/nginx/vhosts.d/*.conf; include C:/www/nginx/conf/mime.types; default_type application/octet-stream; # 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 *; gzip_static always; gunzip on; } # End
include
line(s)add_header Content-Security-Policy "default-src 'self'" always;
add_header Content-Security-Policy "" always;
"notepad.exe" "%SystemDrive%\www\nginx\conf.d\ssl.conf"
ssl_certificate "C:/www/certbot/certs/fullchain1.pem"; ssl_trusted_certificate "C:/www/certbot/certs/fullchain1.pem"; ssl_certificate_key "C:/www/certbot/certs/privkey1.pem"; ssl_session_timeout "10m"; ssl_session_cache "shared:SSL:10m"; ssl_session_tickets "off"; ssl_buffer_size "4k"; ssl_protocols "TLSv1.2" "TLSv1.3"; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM"; ssl_prefer_server_ciphers "on"; ssl_ecdh_curve "secp384r1"; # End
MKDIR "%SystemDrive%\www\scripts\nginx"
"notepad.exe" "%SystemDrive%\www\scripts\nginx\Start.bat"
CD "%SystemDrive%\nginx-"*"\" "nginx.exe" -c "%SystemDrive%\www\nginx\nginx.conf" :: End
"notepad.exe" "%SystemDrive%\www\scripts\nginx\Stop.bat"
CD "%SystemDrive%\nginx-"*"\" "nginx.exe" -s quit :: End
"%SystemDrive%\www\scripts\nginx\Stop.bat"
"notepad.exe" "%SystemDrive%\www\scripts\nginx\Reload.bat"
CD "%SystemDrive%\nginx-"*"\" "nginx.exe" -s reload "nginx.exe" -s reopen :: End
"%SystemDrive%\www\scripts\nginx\Reload.bat"
"%SystemDrive%\www\scripts\nginx\Start.bat"
nginx Start
"%SystemDrive%\www\scripts\nginx\Stop.bat"
nginx Stop
"explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\StartUp"
"%SystemDrive%\www\scripts\nginx\Start.bat"
nginx