You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/advocates/configure-manage-website-application/includes/1-website-application-virtual-directory.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ To add a new site in IIS manager:
42
42
1. Leave Start Website immediately checked unless you want to configure the site before it begins serving requests.
43
43
1. Select OK.
44
44
45
-
You can create a site with the `New-Website` cmdlet, which will be installed with the web server role management tools. For example, to create a site named Contoso with the path D:\contoso on port 80 that uses the fully qualified domain name www.contoso.com and has a new application pool named Contoso, run the command:
45
+
You can create a site with the `New-Website` cmdlet, which will be installed with the web server role management tools. For example, to create a site named Contoso with the path `D:\contoso` on port 80 that uses the fully qualified domain name www.contoso.com and has a new application pool named Contoso, run the command:
46
46
47
47
```powershell
48
48
New-Website -Name "Contoso" `
@@ -62,14 +62,14 @@ Get-Website -Name "Contoso"
62
62
63
63
When creating a website, configure the directory that hosts the content directory and ensure appropriate NTFS permissions are set. Remember that NTFS permissions are often inherited. Best practice is to use a separate volume for website content rather than storing it on the system volume. Using a separate volume for the website allows you to separate the content from operating system files, it also makes it simpler to back up and restore. You might repartition free space on your existing volume to implement this configuration.
64
64
65
-
The worker process runs under the application pool identity. For example, a pool named Contoso runs as IIS AppPool\Contoso. Application pool identities are:
65
+
The worker process runs under the application pool identity. For example, a pool named Contoso runs as `IIS AppPool\Contoso`. Application pool identities are:
66
66
67
67
- Local only
68
68
- Noninteractive
69
69
- Automatically managed
70
70
- Not usable for logon
71
71
72
-
You should grant the application pool identity Read and Execute access to the content folder:
72
+
You should grant the application pool identity `Read and Execute` access to the content folder:
73
73
74
74
```powershell
75
75
$acl = Get-Acl "D:\contoso"
@@ -86,7 +86,7 @@ Granting permissions directly to that identity ensures:
86
86
- Other application pools on the same server can't read or execute the content
87
87
- You avoid using broad identities like Everyone, Users, or IIS_IUSRS
88
88
89
-
Granting Read and Execute adheres to the principle of least privilege as IIS only needs read access to serve static content and load assemblies, and execute is require for binaries such as ASP.NET and native modules. You shouldn't assign the Write privilege as this will limit attacks such as:
89
+
Granting `Read and Execute` adheres to the principle of least privilege as IIS only needs read access to serve static content and load assemblies, and execute is require for binaries such as ASP.NET and native modules. You shouldn't assign the Write privilege as this will limit attacks such as:
Copy file name to clipboardExpand all lines: learn-pr/advocates/configure-manage-website-application/includes/2-application-pool-worker-process.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,9 +121,9 @@ To configure a custom identity in IIS Manager, perform the following steps:
121
121
1. Select the application pool, then select Advanced Settings in the Actions pane.
122
122
1. Under Process Model, select the Identity field, then select the ellipsis (...) button.
123
123
1. In the Application Pool Identity dialog, select Custom account and select Set.
124
-
1. Enter the domain account credentials (for example, CONTOSO\svc-webapp), then select OK.
124
+
1. Enter the domain account credentials (for example, `CONTOSO\svc-webapp`), then select OK.
125
125
126
-
You use the `Set-ItemProperty` cmdlet to configure a Custom Identity with PowerShell. For example, to set the identity to contoso\svc-webapp, run the following command:
126
+
You use the `Set-ItemProperty` cmdlet to configure a Custom Identity with PowerShell. For example, to set the identity to `CONTOSO\svc-webapp`, run the following command:
Copy file name to clipboardExpand all lines: learn-pr/advocates/configure-manage-website-application/includes/3-binding-host-header.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ IIS uses a combination of IP address, TCP port, and host name (host header) to r
4
4
5
5
When a request arrives at the server, IIS evaluates three binding components in order:
6
6
7
-
1. IP address: Does this request target an IP address assigned to this site? An asterisk (\*) means any unassigned IP.
8
-
1. Port: Does the request arrive on the port configured for this site?
9
-
1. Host name (host header): Does the HTTP Host header value in the request match the host name configured for this binding?
7
+
1.**IP address:** Does this request target an IP address assigned to this site? An asterisk (\*) means any unassigned IP.
8
+
1.**Port:** Does the request arrive on the port configured for this site?
9
+
1.**Host name (host header):** Does the HTTP Host header value in the request match the host name configured for this binding?
10
10
11
11
A binding is the combination of these three values. Each site must have at least one binding. Bindings must be unique across all sites, IIS can't start two sites that share the same IP, port, and host name.
12
12
@@ -16,7 +16,7 @@ The table lists strategies for handing bindings:
16
16
|---|---|---|
17
17
|**Unique ports**| Each site listens on a different port (for example, 80, 8080, 8081) | Development and testing environments |
18
18
|**Multiple IP addresses**| Each site is bound to a different IP on the server's NIC | Older hosting configurations |
19
-
|**Host headers (recommended)**| All sites share IP and port; DNS differentiates them via the Host header | Production: www.site1.com and www.site2.com on port 80/443 |
19
+
|**Host headers (recommended)**| All sites share IP and port; DNS differentiates them via the Host header | Production: `www.site1.com` and `www.site2.com` on port 80/443 |
20
20
21
21
> [!TIP]
22
22
> Host headers are the standard approach in production because they don't require additional IP addresses or nonstandard ports. Ensure DNS A records are properly configured for each host name before starting sites.
@@ -30,7 +30,7 @@ To add and edit site bindings in IIS Manager, perform the following steps:
30
30
- Type: Select http or https.
31
31
- IP address: Select All Unassigned or a specific IP.
32
32
- Port: Enter 80 (for HTTP) or 443 (for HTTPS).
33
-
- Host name: Enter the FQDN, for example www.contoso.com. Required when sharing a port with other sites.
33
+
- Host name: Enter the FQDN, for example `www.contoso.com`. Required when sharing a port with other sites.
34
34
- For HTTPS bindings: select the certificate from the drop-down.
Here's a drop-in section you can use to address HTTP Strict Transport Security (HSTS), along with guidance on where to place it in the existing document:
91
-
92
90
## Enforcing HTTPS with HTTP Strict Transport Security (HSTS)
93
91
94
92
To further enhance the security of HTTPS-enabled websites, IIS 10 on Windows Server 2019 and later supports native configuration of HTTP Strict Transport Security (HSTS). HSTS instructs browsers to always use HTTPS when connecting to your site, even if a user attempts to access it via HTTP. This helps prevent protocol downgrade attacks and ensures encrypted communication for all future requests.
Copy file name to clipboardExpand all lines: learn-pr/advocates/configure-manage-website-application/includes/4-advanced-site-configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ Beyond basic site creation and bindings, IIS provides a rich set of per-site and
2
2
3
3
## Custom Error Pages
4
4
5
-
By default, IIS returns a generic HTTP error page when a client encounters a 4xx or 5xx status code. Customizing error pages improves the user experience and prevents accidental disclosure of internal diagnostic details.
5
+
By default, IIS returns a generic HTTP error page when a client encounters a `4xx` or `5xx` status code. Customizing error pages improves the user experience and prevents accidental disclosure of internal diagnostic details.
0 commit comments