OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: dasuberadmin on January 24, 2022, 11:37:16 am

Title: [haproxy] Redirect to https not working
Post by: dasuberadmin on January 24, 2022, 11:37:16 am
Hello world!

I have HAproxy running on OPNsense with 4 backend servers where the backend server is chosen based on a "Host contains" rule. When navigating to the site(s) with http I just get an empty response.

I tried to get https working with the following condition and rule:

Condition:
Traffic is HTTP

Rule:
http-request redirect
HTTP redirect:
scheme https

When I enable this config all backend servers become unavailable, rebooting opnsense doesn't change anything and when going back to the old config doesn't help either so I have to restore opnsense from backup.

What can I do to make the redirect work and what should I keep in mind when changing the settings?

Kind regards
Title: Re: [haproxy] Redirect to https not working
Post by: Inxsible on February 03, 2022, 02:25:51 am
Why would you redirect all HTTP traffic to your backend?

Please list what it is that you are trying to achieve so that the users here might be able to understand the issue you are facing.