@@ -143,6 +143,54 @@ git.example.com {
143143}
144144```
145145
146+ #### How do I use IIS with Reverse Proxy?
147+ 148+ Create a new website in IIS, and use the following ` web.config ` file:
149+ 150+ - Modifiy ` git.crystalnetwork.us ` to your actual domain name
151+ - If you don't use or need HTTPS to be handled by IIS, remove the entire ` <rule name="RedirectToHttps" ...> ` section
152+ 153+ ``` xml
154+ <?xml version =" 1.0" encoding =" UTF-8" ?>
155+ <configuration >
156+ <system .webServer>
157+ <rewrite >
158+ <rules >
159+ <rule name =" RedirectToHttps" stopProcessing =" true" >
160+ <match url =" .*" />
161+ <conditions >
162+ <add input =" {HTTPS}" pattern =" off" ignoreCase =" true" />
163+ </conditions >
164+ <action type =" Redirect" url =" https://{HTTP_HOST}{REQUEST_URI}" redirectType =" Permanent" appendQueryString =" false" />
165+ </rule >
166+ <rule name =" ReverseProxyInboundRule" stopProcessing =" true" >
167+ <match url =" (.*)" />
168+ <action type =" Rewrite" url =" http://localhost:3000/{R:1}" />
169+ </rule >
170+ </rules >
171+ <outboundRules >
172+ <rule name =" ReverseProxyOutboundRule" preCondition =" ResponseIsHtml" >
173+ <match filterByTags =" A, Form, Img" pattern =" ^http(s)?://localhost:3000/(.*)" />
174+ <action type =" Rewrite" value =" http{R:1}://git.crystalnetwork.us/{R:2}" />
175+ </rule >
176+ <preConditions >
177+ <preCondition name =" ResponseIsHtml" >
178+ <add input =" {RESPONSE_CONTENT_TYPE}" pattern =" ^text/html" />
179+ </preCondition >
180+ </preConditions >
181+ </outboundRules >
182+ </rewrite >
183+ </system .webServer>
184+ </configuration >
185+ ```
186+ 187+ Then, change the following configuration options in ` custom/conf/app.ini ` :
188+ 189+ ```
190+ [server]
191+ EXTERNAL_URL = https://git.example.com/
192+ ```
193+ 146194#### How do I set up HTTPS?
147195
148196Change the following configuration options in ` custom/conf/app.ini ` in the section that looks like this sample:
0 commit comments