# Help with backend

**URL:** <https://discourse.haproxy.org/t/help-with-backend/2146>\
**Category:** Help!\
**Created:** [February 21, 2018, 6:14am UTC](https://discourse.haproxy.org/t/help-with-backend/2146 "2018-02-21T06:14:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flygirl](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@flygirl](https://discourse.haproxy.org/u/flygirl)\
**Post date:** [February 21, 2018, 6:14am UTC](https://discourse.haproxy.org/t/help-with-backend/2146/1 "2018-02-21T06:14:22Z")

</div>

I want to restrict my backend connection to ports 80 and 8080 only and frontend connection to 443 only.

backend HA\_NODES  
balance roundrobin  
mode http  
option httpchk GET /health\_check.json  
description HA\_NODES  
server app1-stg-7878 10.10.7.31:7878 check fastinter 2000 inter 7000  
server app1-stg-7879 10.10.7.31:7879 check fastinter 2000 inter 7000  
server app2-stg-7878 10.10.7.32:7878 check fastinter 2000 inter 7000  
server app2-stg-7879 10.10.7.32:7879 check fastinter 2000 inter 7000  
acl allow\_port dst\_port 80  
http-request allow if allow\_port

frontend HA\_FRONTEND\_HTTPS  
bind \*:443 ssl crt /etc/ssl/private/code.com.pem  
mode http  
http-request set-header X-Request-Start t=%Ts%ms  
description HA\_FRONTEND\_HTTPS  
default\_backend HA\_NODES  
acl allow\_port dst\_port 443  
http-request allow if allow\_port

frontend HA\_FRONTEND\_HTTP  
bind \*:80  
mode http  
http-request set-header X-Request-Start t=%Ts%ms  
description HA\_FRONTEND\_HTTP  
default\_backend HA\_NODES

I tried commenting out frontend HA\_FRONTEND\_HTTP part and restarted haproxy service but I can still access it using the port 80.

If I try to put deny ACL on backend, this will take effect on frontend as well.

I’m new with haproxy.
