-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
403 Forbidden error
As I was trying to configure my HAProxy loadbalancer, I used default template provided in documentation but there was a bug! even though I configured everything correctly and everything was working fine, I couldn't access my panel and I recived (403 Forbiden) error. so I figured out it was a bug in configuration file.
The "http_request deny"" rule will execute first although it's written after "use_backend's" and it leads to 403 error. this is the fix for it:
- Remove http_request deny first.
- Add this new line after use_backend's, so when none of use_backend's executed this rule will execute:
# ... previous config ...
use_backend panel if host_panel
use_backend sub if host_sub
# If nothing matches above, it goes here:
default_backend deny_backend
- Add this line to the bottom of the file:
backend deny_backend
mode http
http-request deny deny_status 403
Make sure spacing is correct ;)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels