Skip to content

Commit

Permalink
Add web.configs for IIS and add $ for match for setAcl
Browse files Browse the repository at this point in the history
  • Loading branch information
markkevans committed Sep 19, 2010
1 parent 57fa363 commit 6a8456b
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 6 deletions.
16 changes: 16 additions & 0 deletions extras/iis/web.configs/admin/backups/web.config
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RequestBlockingRule2" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{URL}" pattern="*" />
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="File or directory not found." statusDescription="The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable." />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
16 changes: 16 additions & 0 deletions extras/iis/web.configs/admin/images/web.config
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RequestBlockingRule1" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{URL}" pattern="\.(php([0-9]|s)?|s?p?html|cgi|pl|exe)$" />
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="File or directory not found." statusDescription="The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable." />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
16 changes: 16 additions & 0 deletions extras/iis/web.configs/admin/includes/web.config
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">
<match url="*.php" />
<conditions>
<add input="{URL}" pattern="*" />
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="File or directory not found." statusDescription="The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable." />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
16 changes: 16 additions & 0 deletions extras/iis/web.configs/images/web.config
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RequestBlockingRule1" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{URL}" pattern="\.(php([0-9]|s)?|s?p?html|cgi|pl|exe)$" />
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="File or directory not found." statusDescription="The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable." />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
16 changes: 16 additions & 0 deletions extras/iis/web.configs/includes/web.config
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">
<match url="*.php" />
<conditions>
<add input="{URL}" pattern="*" />
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="File or directory not found." statusDescription="The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable." />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
16 changes: 16 additions & 0 deletions extras/iis/web.configs/includes/work/web.config
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RequestBlockingRule2" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{URL}" pattern="*" />
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="File or directory not found." statusDescription="The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable." />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
6 changes: 6 additions & 0 deletions extras/iis/web.configs/pub/web.config
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>
Binary file modified extras/mysql_setup.sql
Binary file not shown.
9 changes: 9 additions & 0 deletions manifest.xml
Expand Up @@ -29,4 +29,13 @@
setAclAccess="Modify"
setAclUser="anonymousAuthenticationUser"/>

<!-- Replace .htaccess files with web.config -->
<alias from="extras\iis\web.configs\admin\backups\web.config" to="catalog\admin\backups\web.config" />
<alias from="extras\iis\web.configs\admin\includes\web.config" to="catalog\admin\includes\web.config" />
<alias from="extras\iis\web.configs\admin\images\web.config" to="catalog\admin\images\web.config" />
<alias from="extras\iis\web.configs\includes\web.config" to="catalog\includes\web.config" />
<alias from="extras\iis\web.configs\includes\work\web.config" to="catalog\includes\work\web.config" />
<alias from="extras\iis\web.configs\images\web.config" to="catalog\images\web.config" />
<alias from="extras\iis\web.configs\pub\web.config" to="catalog\pub\web.config" />

</msdeploy.iisapp>
12 changes: 6 additions & 6 deletions parameters.xml
Expand Up @@ -19,7 +19,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
match="catalog/includes/configure.php" />
match="catalog/includes/configure.php$" />
</parameter>

<parameter name="SetAclParameter2"
Expand All @@ -30,7 +30,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
match="catalog/admin/includes/configure.php" />
match="catalog/admin/includes/configure.php$" />
</parameter>

<parameter name="SetAclParameter3"
Expand All @@ -41,7 +41,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
match="catalog/images" />
match="catalog/images$" />
</parameter>

<parameter name="SetAclParameter4"
Expand All @@ -52,7 +52,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
match="catalog/admin/images/graphs" />
match="catalog/admin/images/graphs$" />
</parameter>

<parameter name="SetAclParameter5"
Expand All @@ -63,7 +63,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
match="catalog/admin/backups" />
match="catalog/admin/backups$" />
</parameter>

<parameter name="SetAclParameter6"
Expand All @@ -74,7 +74,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
match="catalog/includes/work" />
match="catalog/includes/work$" />
</parameter>

<parameter name="DatabaseServer"
Expand Down

0 comments on commit 6a8456b

Please sign in to comment.