-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathweb.config
86 lines (80 loc) · 3.12 KB
/
web.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!--
Project: ProjectNami-Windows-Install-Utils
File: web.config
By: Phil Huhn
Date: 2017-09-24
Description:
This is an IIS website configuration file.
-->
<system.webServer>
<security>
<!--
In: 'Turn Windows features on or off'
World Wide Web Services + Security => check 'IP Security' => click OK (button)
In: Internet Information Service (IIS) Manager
On site click: IP Address and Domain Restrictions
x Deny IP Address based on the number of concurrent requests
x Deny IP Address based on the number of requests over a preiod of time
x Enable Logging Only Mode
-->
<dynamicIpSecurity enableLoggingOnlyMode="true">
<denyByConcurrentRequests enabled="true" maxConcurrentRequests="10" />
<denyByRequestRate enabled="true" maxRequests="30"
requestIntervalInMilliseconds="300" />
</dynamicIpSecurity>
<!--
https://docs.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig
This section should be uncommented after
installation to secure the installation.
-->
<requestFiltering>
<denyUrlSequences>
<!--
-->
<add sequence="config.php" />
<add sequence="readme" />
</denyUrlSequences>
<fileExtensions>
<add fileExtension=".sql" allowed="false" />
<add fileExtension=".ini" allowed="false" />
<add fileExtension=".bat" allowed="false" />
<add fileExtension=".cmd" allowed="false" />
<add fileExtension=".ps1" allowed="false" />
</fileExtensions>
</requestFiltering>
</security>
<directoryBrowse enabled="false" />
<caching>
<profiles>
<add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
<add extension=".html" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="14:00:00:00" />
</profiles>
</caching>
<defaultDocument>
<files>
<remove value="index.php" />
<add value="index.php" />
</files>
</defaultDocument>
<!--
https://codex.wordpress.org/Using_Permalinks
Enable 'Permalink Setting', rewrite the URL line.
Requires URL Rewrite module installed to IIS by Web Platform installer
-->
<rewrite>
<rules>
<rule name="Main WordPress Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<!-- add input="{REQUEST_URI}" matchType="Pattern" pattern="^/wp-admin/" negate="true" /-->
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>