Skip to content

Instantly share code, notes, and snippets.

@slavikdev
Created October 16, 2011 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slavikdev/1290887 to your computer and use it in GitHub Desktop.
Save slavikdev/1290887 to your computer and use it in GitHub Desktop.
web.config, helicon zoo, thin, rails 3.1
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<heliconZoo>
<application name="rails.project.x86" >
<environmentVariables>
<add name="DEPLOY_FILE" value="deploy.rb" />
<add name="DEPLOY_LOG" value="log\zoo-deploy.log" />
<!-- By default we run Rails in production mode -->
<!-- <add name="RACK_ENV" value="development" /> -->
<!-- If deployment is too long this doesn't let worker to die -->
<add name="WORKER_REQUEST_TIMEOUT" value="1000" />
</environmentVariables>
</application>
<application name="rails.project.x64" >
<environmentVariables>
<add name="DEPLOY_FILE" value="deploy.rb" />
<add name="DEPLOY_LOG" value="log\zoo-deploy.log" />
<!-- By default we run Rails in production mode -->
<!-- <add name="RACK_ENV" value="development" /> -->
<!-- If deployment is too long this doesn't let worker to die -->
<add name="WORKER_REQUEST_TIMEOUT" value="1000" />
</environmentVariables>
</application>
</heliconZoo>
<handlers>
<add name="rails.project.x86" scriptProcessor="thin.http" path="*" verb="*" modules="HeliconZoo_x86" preCondition="bitness32" resourceType="Unspecified" requireAccess="Script" />
<add name="rails.project.x64" scriptProcessor="thin.http" path="*" verb="*" modules="HeliconZoo_x64" preCondition="bitness64" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<!-- Send static files through IIS -->
<rewrite>
<rules>
<rule name="Avoid Static Files" stopProcessing="true">
<match url="^(?!public)(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
<add input="{C:1}public\{R:1}" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="public/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment