We have the same situation where we accept traffic for a long list of
domains. We solve the problem by adding the following for each domain

redirect prefix https://<sub>.domain.com if !is_https make_https {
hdr(host) <sub>.eqaldev.com }

The above solution only works if the list of the subdomains is finite and
can be iterated upon so that a line can be added for each subdomain. We do
reload the haproxy config every time a new subdomain is added.

Vivek

On Mon, Mar 5, 2012 at 3:18 PM, Finn Arne Gangstad <[email protected]> wrote:

> On Mon, Mar 5, 2012 at 7:03 PM, Richard Stanford <[email protected]>
> wrote:
> > [...]
> >
> > Our challenge is that our servers accept connections on a wildcard
> hostname
> > ( *.domain.com ) and we need to maintain the host identity during the
> > redirection, so hardcoding the host portion won't work in our case.
>  Would
> > somebody be able to help me out with the correct syntax, if its even
> > possible?  Thanks!
>
> This cannot be done with haproxy. We use nginx for this, but apache
> obviously works too.
>
> - Finn Arne
>
>

Reply via email to