Last active
January 24, 2019 20:50
-
-
Save hfike/d618571c99151ffebf27a40a07e06a5a to your computer and use it in GitHub Desktop.
Reposado on IIS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Because I am hosting Apple specific files on an IIS server, and also due to the fact that there are other services running from this Site (munki, imagr), MIME Types are configured. | |
The web.config file from the root directory of the site: | |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<directoryBrowse enabled="false" /> | |
<security> | |
<authentication> | |
<anonymousAuthentication userName="" /> | |
</authentication> | |
</security> | |
<staticContent> | |
<mimeMap fileExtension="." mimeType="text/xml" /> | |
<mimeMap fileExtension=".dmg" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".pkg" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".mpkg" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".plist" mimeType="text/xml" /> | |
<mimeMap fileExtension=".pkginfo" mimeType="text/xml" /> | |
<mimeMap fileExtension=".mobileconfig" mimeType="text/xml" /> | |
<mimeMap fileExtension=".dist" mimeType="text/xml" /> | |
<mimeMap fileExtension=".pkm" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".sucatalog" mimeType="text/xml" /> | |
</staticContent> | |
</system.webServer> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My URL for the apple update catalog is http://applesus.company.com/reposado/index_branch.sucatalog | |
In IIS I have a Virtual Directory called "reposado" pointing to D:\DataDrive\reposado_repo\html\ | |
The web.config file for that virtual directory (the web.config file is contained in the above directory) is the following: | |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Darwin/16" stopProcessing="true"> | |
<match url="^index(.*)\.sucatalog$" /> | |
<conditions> | |
<add input="{HTTP_USER_AGENT}" pattern="Darwin/16" /> | |
</conditions> | |
<action type="Rewrite" url="content/catalogs/others/index-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1{R:1}.sucatalog" /> | |
</rule> | |
<rule name="Darwin/17" stopProcessing="true"> | |
<match url="^index(.*)\.sucatalog$" /> | |
<conditions> | |
<add input="{HTTP_USER_AGENT}" pattern="Darwin/17" /> | |
</conditions> | |
<action type="Rewrite" url="content/catalogs/others/index-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1{R:1}.sucatalog" /> | |
</rule> | |
<rule name="Darwin/18" stopProcessing="true"> | |
<match url="^index(.*)\.sucatalog$" /> | |
<conditions> | |
<add input="{HTTP_USER_AGENT}" pattern="Darwin/18" /> | |
</conditions> | |
<action type="Rewrite" url="content/catalogs/others/index-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1{R:1}.sucatalog" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment