Skip to content

Instantly share code, notes, and snippets.

@stoft
Created April 18, 2017 14:40
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 stoft/308e416747b988ac1db712be3aa1f332 to your computer and use it in GitHub Desktop.
Save stoft/308e416747b988ac1db712be3aa1f332 to your computer and use it in GitHub Desktop.
Setup IIS 7.5 as proxy for Cerebro
# Setup IIS 7.5 as proxy for Cerebro
# Note: requires basePath in Cerebro config to be '/cerebro/'
# Set up Cerebro server as a server farm
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /+"[name='cerebro-farm']" /commit:apphost
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /+"[name='cerebro-farm'].[address='localhost']" /commit:apphost
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /[name='cerebro-farm'].[address='localhost'].applicationRequestRouting.httpPort:"9000" /commit:apphost
%windir%\system32\inetsrv\appcmd.exe set config -section:webFarms /[name='cerebro-farm'].[address='localhost'].applicationRequestRouting.httpsPort:"9443" /commit:apphost
# Set up routing rules
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/rewrite/globalRules /+"[name='ARR_cerebro-farm_loadbalance', patternSyntax='ECMAScript',stopProcessing='True']" /commit:apphost
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/rewrite/globalRules /[name='ARR_cerebro-farm_loadbalance',patternSyntax='ECMAScript',stopProcessing='True'].match.url:"(\/?cerebro\/?)(.*)" /commit:apphost
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/rewrite/globalRules /[name='ARR_cerebro-farm_loadbalance',patternSyntax='ECMAScript',stopProcessing='True'].action.type:"Rewrite" /[name='ARR_cerebro-farm_loadbalance',patternSyntax='ECMAScript',stopProcessing='True'].action.url:"http://cerebro-farm/cerebro/{R:2}" /commit:apphost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment