IIS Configuration
Navigate to: IIS Manager > Server Level > Application Request Routing Cache > Server Proxy Settings
Enable Proxy: Checked
Reverse rewrite host in response headers: Checked
Navigate to: Default Web Site > Request Filtering > Edit Feature Settings
Navigate to: Default Web Site > URL Rewrite > Add Rules > Blank Rule
Name: Jenkins Rewrite
Match URL: Using Regular Expressions
(.*)
Conditions:
{HTTP_HOST}
matches .*jenkins.mydomain.com.*
Action:
Action Type: Rewrite
Rewrite URL: http://localhost:8080{UNENCODED_URL}
Append Query String: Checked
Navigate to: Default Web Site > Configuration Editor > system.webServer/rewrite/rules
useOriginalURLEncoding
to False
-------------
Jenkins Configuration
Navigate to: Manage Jenkins > Configure System
https://jenkins.mydomain.com/
Navigate to: Manage Jenkins > Configure Global Security
-------
Notes
Do not modify the hosts file to map jenkins.mydomain.com
to 127.0.0.1
.
No need to configure SSL in IIS since SSL termination is handled by the ALB.
Ignore Jenkins reverse proxy warning once everything is working correctly.