# IIS configuration

## What you need:

Below are what you will need to complete this setup

* The IP address for your instance: This will be provided by us
* The path or list of paths that your pages will be hosted under

## Proxy Setup

This guide describes the configuration options area where you would setup the Proxy pass to our backend systems: <https://blogs.msdn.microsoft.com/friis/2016/08/25/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps/>

Using the IP address of your instance, you would configure the following options:

* IP Address/Port: `<YOUR IP ADDRESS>:80`
* Enable the option *"Enable SSL offloading"*
* Disable the option *"Rewrite the domain names of the links in HTTP responses"*

## Restrict only sending us specific paths

Since you will only be sending us certain paths using this URL rewrite, you should setup a filter so that this URL rewrite only gets applied to a regex pattern. Example would be regex pattern `^(img|stat|style|your-page-path)/(.*)` to filter the requests to send us old these paths.

In addition to the default paths `img|stat|style`, `your-page-path` would be replaced with the pages you want to host with us.

## Host header

We will also need you to configure the server to preserve and send us the "Host" header so that it sends us `www.yourdomain.com` on the requests so that we can load up the correct site and page.

You will need to enable the configuration to "preserveHostHeader". Here is a stackoverflow article describing this: <https://stackoverflow.com/questions/1842885/modifying-headers-with-iis7-application-request-routing>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devhub.com/hosting-options/server-path-override/iis-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
