> On Feb 1, 2017, at Feb 1, 1:21 AM, parag bharne <[email protected]>
> wrote:
>
> Above Conditions will work for 80 port, for SSL It works on 443, but for
> other port i.e 8080 The SSL cannot get access.
The sample configs do not make much sense given this statement so it’s hard to
say what you’re trying to do.
My recommendation is to simplify your config and get it working for both your
sites with only HTTPS. Then add support to redirect HTTP requests to the
working HTTPS listener.
>
> See My Configuration File I have Tried
> ### First Configuration###
> frontend www-http
> bind *:80
> bind *:443 ssl crt /etc/apache2/ssl/apache.pem
> reqadd X-Forwarded-Proto:\ https
> default_backend tcp-backend
> mode tcp
>
> frontend www-http
> bind *:80
> bind *:443 ssl crt /etc/apache2/ssl/apache.pem
> reqadd X-Forwarded-Proto:\ https
> default_backend www-backend
> mode tcp
>
>
> backend tcp-backend
> redirect scheme https if !{ ssl_fc }
> server example 1.0.0.0:8080 <http://1.0.0.0:8080/> check
>
> backend www-backend
> redirect scheme https if !{ ssl_fc }
> server example.com <http://example.com/> 1.0.0.1:80 <http://1.0.0.1/>
> check
>
> ## Second Configuration ##
>
> frontend www-http2
> bind *:80
> bind *:443 ssl crt /etc/apache2/ssl/apache.pem
> reqadd X-Forwarded-Proto:\ https
> default_backend tcp-backend
> mode tcp
>
> frontend tcp-http1
> bind *:81
> bind *:81 ssl crt /etc/apache2/ssl/apache.pem
> reqadd X-Forwarded-Proto:\ https
> default_backend www-backend
> mode tcp
>
> backend tcp-backend
> redirect scheme https if !{ ssl_fc }
> server example.com <http://example.com/> 1.0.0.0:8080
> <http://1.0.0.0:8080/> check
>
> backend www-backend
> redirect scheme https if !{ ssl_fc }
> server example.com <http://example.com/> 1.0.0.1:80 <http://1.0.0.1/>
> check
>
> #####################################################Please Help mi to
> Confiuration Chnages if any have. Give some hints to do that one
>
> Thanks and Regards
> Parag Bharne
>
>
> On Wed, Feb 1, 2017 at 12:59 PM, Bryan Talbot <[email protected]
> <mailto:[email protected]>> wrote:
>
>> On Jan 31, 2017, at Jan 31, 11:26 PM, parag bharne
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> HI,
>> Here our scenario where we wnat to work using haproxy
>>
>> (client) -> http://www.example.com <http://www.example.com/> -> (redirect)
>> -> https://www.example.com <https://www.example.com/>
>> (client) -> http://www.example.com:8080 <http://www.example.com:8080/> ->
>> (redirect) ->
>> https://www.example.com <https://www.example.com/>:8080
>>
>> This is Possible in haproxy or not, plz try to reply as fast as possible
>>
>
> Yes.
>
>
>
>> Parag Bharne
>
>