In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This article is to share with you how to install and configure HAProxy in CentOS 8. I believe most people don't know how to install the configuration. In order to let you learn, I summarized the following contents. Without saying much, let's read on.
Requirements: simple layer 4 (SSH) and layer 7 (HTTP) reverse proxy
Erection environment: CentOS 8
Installation
> sudo dnf install haproxy
Configuration
> sudo vim / etc/haproxy/haproxy.cfg# the following is the key modification part global. Maxconn 20480 ulimit-n 65535... default... Stats uri / haproxy?stats # View the status of haproxy Address http:///haproxy?stats. # define layer 7 HTTP forwarding frontend sdc bind *: 80 # define acl for different streamset data controller server acl sdc1-policy hdr_dom (host)-I sdc1.3rd.pla95929 acl sdc2-policy hdr_dom (host)-I sdc2.3rd.pla95929 # backend for acl use_backend server_sdc1 if sdc1-policy use_backend server_sdc2 if sdc2-policy # send X-Forwarded -For header option forwardfor except 127.0.0.0/8backend server_sdc1 server srv sdc1:18630 checkbackend server_sdc2 server srv sdc2:18630 check# sdc1 and sdc2 are recorded in haproxy / etc/hosts You can also directly write ip,srv for the custom name # define layer 4 TCP forwarding listen ssh-sdc1 mode tcp option tcplog tcp-request inspect-delay 5s bind *: 2201 server node sdc1:22 checklisten ssh-sdc2 mode tcp option tcplog tcp-request inspect-delay 5s bind *: 220 layer 4 inversion cannot configure acl policy by checking host, it can only be implemented by port binding
After reading this article, have you learned how to install and configure HAProxy? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.