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
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ IIS organizes web content through a hierarchy of sites, applications, and virtua
4
4
5
5
IIS structures web content in a three-tier hierarchy:
6
6
7
-
1.**Website (Site).** The top-level container. Each site has at least one binding (IP address, port, and optional host name) that identifies incoming requests. A site maps to a physical root directory on disk.
8
-
1.**Web Application.** A child container within a site. Applications have their own application pool assignment and can have separate configuration settings from the parent site. Use applications when you need isolated configuration, a different .NET runtime, or a dedicated worker process identity for a portion of a site.
9
-
1.**Virtual Directory.** A pointer from a URL path to a physical directory on disk (which may be on a different volume or UNC path). Virtual directories don't have their own application pool and inherit the parent application's settings.
7
+
-**Website (Site).** The top-level container. Each site has at least one binding (IP address, port, and optional host name) that identifies incoming requests. A site maps to a physical root directory on disk.
8
+
-**Web Application.** A child container within a site. Applications have their own application pool assignment and can have separate configuration settings from the parent site. Use applications when you need isolated configuration, a different .NET runtime, or a dedicated worker process identity for a portion of a site.
9
+
-**Virtual Directory.** A pointer from a URL path to a physical directory on disk (which may be on a different volume or UNC path). Virtual directories don't have their own application pool and inherit the parent application's settings.
10
10
11
11
> [!NOTE]
12
12
> This hierarchy is stored in the central IIS configuration file, ApplicationHost.config, located at %windir%\system32\inetsrv\config\.
@@ -37,7 +37,7 @@ To add a new site in IIS manager:
37
37
- Port: Enter 80 (or another port if 80 is already in use and you're hosting multiple sites on the same IP address but differentiating based on port).
38
38
- Host name: Enter the FQDN for this site, for example www.contoso.com. Host names are required when multiple sites share port 80 or 443 on the same IP address. The sites are differentiated by IIS using the HTTP host header value in each incoming request.
39
39
40
-

40
+

41
41
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.
@@ -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 required for binaries such as ASP.NET and native modules. You shouldn't assign the Write privilege as this will limit attacks such as:
90
90
91
91
- Web shell uploads
92
92
- Defacement attacks
@@ -96,15 +96,15 @@ Granting `Read and Execute` adheres to the principle of least privilege as IIS o
96
96
97
97
To add a Web Application within a Site
98
98
99
-
1. In the Connections pane, expand Sites, then select on the Contoso site.
99
+
1. In the Connections pane, expand Sites, then select the Contoso site.
100
100
1. Right-click the site and select Add Application.
101
101
1. In the Add Application dialog, configure:
102
102
- Alias: The URL path segment, for example demoapp (accessible at www.contoso.com/demoapp).
103
103
- Application pool: Select or create a dedicated pool.
104
104
- Physical path: Enter the path to the application's files, for example d:\demoapp.
105
105
1. Select OK.
106
106
107
-

107
+

108
108
109
109
You can accomplish this with the following PowerShell command:
110
110
@@ -125,7 +125,7 @@ To add a virtual directory within a site using IIS Manager, perform the followin
125
125
- Physical path: Enter the directory path, for example D:\shared\downloads.
126
126
1. Select OK.
127
127
128
-
To add a virtual directory using PowerShell, perform the following steps:
128
+
You can add a virtual directory using the PowerShell`New-WebVirtualDirectory` cmdlet. For example, to add a new virtual directory named `downloads` to the `Contoso` site, run the command:
Copy file name to clipboardExpand all lines: learn-pr/advocates/configure-manage-website-application/includes/2-application-pool-worker-process.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ To create an application pool using IIS Manager, perform the following steps:
21
21
- Managed pipeline mode: Select Integrated.
22
22
1. Select OK.
23
23
24
-

24
+

25
25
26
26
To edit an existing pool, double-click it or select it and select Basic Settings in the Actions pane.
27
27
@@ -50,7 +50,7 @@ To configure application pool recycling in IIS Manager, perform the following st
50
50
- Memory-based recycling: Set virtual memory and private memory limits (in KB) to trigger recycling if the worker process exceeds those thresholds.
51
51
1. Select Next to configure recycling event log settings, then select Finish.
52
52
53
-

53
+

54
54
55
55
You use the `Set-ItemProperty` cmdlet to configure application pool recycling using PowerShell. For example, to configure a regular interval, run the following command:
Copy file name to clipboardExpand all lines: learn-pr/advocates/configure-manage-website-application/includes/3-binding-host-header.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ To add and edit site bindings in IIS Manager, perform the following steps:
36
36
37
37
To edit an existing binding: select it in the list and select Edit. To remove a binding: select it and select Remove. Removing the only binding makes the site inaccessible.
38
38
39
-
You managing bindings in PowerShell with the `WebBinding` cmdlets. For example:
39
+
You manage bindings in PowerShell with the `WebBinding` cmdlets. For example:
40
40
41
41
```powershell
42
42
# Add an HTTP binding with a host header
@@ -75,7 +75,7 @@ To enable SNI in IIS Manager:
75
75
> [!NOTE]
76
76
> Every HTTPS site sharing the same IP and port 443 must have SNI enabled. If even one site on that IP/port doesn't use SNI, it conflicts with the others.
77
77
78
-
To enabling SNI with PowerShell, use the `WebBinding` cmdlets. For example:
78
+
To enable SNI with PowerShell, use the `WebBinding` cmdlets. For example:
79
79
80
80
```powershell
81
81
# SslFlags: 0 = no SNI, 1 = SNI, 2 = central certificate store
Copy file name to clipboardExpand all lines: learn-pr/advocates/configure-manage-website-application/includes/4-advanced-site-configuration.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Beyond basic site creation and bindings, IIS provides a rich set of per-site and per-application configuration options that affect how content is served and how errors are handled. In this unit, you configure custom HTTP error pages, implement URL redirection, manage MIME types, enable HTTP compression, and configure request filtering to block unwanted or potentially harmful traffic.
2
2
3
-
## Custom Error Pages
3
+
## Custom error pages
4
4
5
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.
6
6
@@ -31,7 +31,7 @@ Set-WebConfiguration `
31
31
}
32
32
```
33
33
34
-
## MIME Types
34
+
## MIME types
35
35
36
36
MIME types tell clients (browsers) how to interpret the content being served. If a file extension isn't registered in IIS, IIS returns a `404.3` error instead of serving the file, even if the file exists on disk.
Request filtering is a built-in IIS security module that inspects incoming requests and blocks those that match defined rules. It's installed by default and runs early in the request pipeline, before most application code executes.
> Overly aggressive request filtering can cause legitimate requests to fail. Test filtering rules in a staging environment before deploying to production. Review IIS logs for `404.x` and `400` errors that may indicate blocked legitimate traffic.
139
139
140
-
## Using the Built-In HTTP Redirect Feature
140
+
## Using the built-In HTTP redirect feature
141
141
142
142
For simple whole-site redirects, IIS includes a built-in HTTP Redirect feature that doesn't require the URL Rewrite module:
0 commit comments