IIS and Nginx security baseline on Windows Server
A practical baseline: remove unused features, lock request surface, separate identities, enable logging and patch the host, without claiming CIS compliance.
Tested onStandard / Datacenter · Build 26100.33650 · x64
E1- Build
- 26100.33650
- Edition
- Standard / Datacenter
- Architecture
- x64
- Support
- Documentation (E1)
- Evidence
- E1Official documentation
- Verified
- 2026-10-29
- Page type
- Checklist
The short answer
Section titled “The short answer”A baseline is not a 300-line script. It is a repeatable set of decisions:
- Install only the roles/modules you use.
- Remove the default site and sample content.
- Give each site an app pool and least-privilege identity.
- Limit request surface (methods, size, extensions, directory browsing).
- Terminate TLS correctly; no plaintext admin.
- Log access/errors and ship them off-box.
- Patch Windows, IIS/Nginx, runtimes and dependencies.
- Restrict management (RDP/WinRM/WAC) to a management network.
- Windows Update/patches on a schedule; reboot plan.
- Defender/EDR enabled and exclusions reviewed (not “exclude everything for performance”).
- Firewall: only 80/443 public; 3389/5985/5986 management-only.
- No IIS FTP/WebDAV/IIS 6 compatibility unless required.
- Dedicated service accounts; no LocalSystem for web apps.
- Local admin group small; use LAPS/just-in-time where possible.
Get-WindowsFeature Web-Server,Web-Ftp-Server,Web-DAV-Publishing,Web-Windows-AuthGet-WebSite | Select-Object Name,State,PhysicalPath,ApplicationPoolGet-WebVirtualDirectory | Select-Object Site,Path,PhysicalPathChecklist:
- Default Web Site stopped/removed.
- Directory browsing off.
- Request filtering on; only required extensions/methods.
- App pool = No Managed Code for static/PHP/Node, dedicated identity.
web.confignot writable by the app pool.- Custom errors on; detailed errors local only.
- Logging on, retention set, logs off the system drive.
- Unused handlers/modules removed (careful with static content).
server_tokens off;autoindex off;client_max_body_size 50m;- One
serverblock per host; explicitserver_name. - TLS only; redirect 80 → 443.
- Deny dotfiles and backup paths.
- Keep
error_log/access_logand rotate them. - Run as a dedicated account, not LocalSystem.
Baseline vs compliance
Section titled “Baseline vs compliance”CIS/Microsoft security baselines are useful references, but “we applied a baseline” is not compliance. Record:
- OS build and patch level;
- IIS/Nginx version;
- runtime versions;
- exceptions and owners;
- last test date.
Verify
Section titled “Verify”Get-Service W3SVC,WASGet-NetFirewallProfile | Select-Object Name,EnabledGet-Website | Where-Object State -eq 'Started'Then scan from another host: only intended ports should answer. A local localhost test does not prove the firewall.
Lab boundary
Section titled “Lab boundary”E1. The lab applied a minimal IIS install and no production hardening; this checklist is the baseline to verify on Server 2025.