Welcome! Log In Create A New Profile

Advanced

Can we replace HAProxy with NGINX

March 16, 2017 06:37PM
Hi,

I have the following HAProxy configuration:

global
log 127.0.0.1 local1
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
---
---

tune.comp.maxlevel 5
defaults
mode http
log global
option httplog
----------
--------
--------
maxconn 3000
# enable compression (haproxy v1.5-dev13 and above required)
compression algo gzip
compression type text/html application/javascript text/css application/x-javascript text/javascript application/json
frontend http-in
bind *:443 ssl crt /etc/ssl/example.com

mode http

http-request redirect scheme https if { hdr(Host) -i example.com } !{ ssl_fc }

acl cluster1_dead nbsrv(service_servers) lt 1
http-request deny if cluster1_dead

acl is_service path_beg -i /Module/service

use_backend service_servers if is_service

default_backend web_servers
backend web_servers
balance roundrobin
option forwardfor

cookie SERVERID insert secure httponly maxidle 60m maxlife 180m indirect

server exampl.com_id example.com:8080 cookie example.com_name check port 8080 inter 1000

backend service_servers
balance roundrobin
option forwardfor

cookie SERVERID insert secure httponly maxidle 60m maxlife 180m indirect
reqrep ^([^\ :]*)\ /Module/service/(.*) \1\ /Module1/\2

server exampl.com_id example.com:8080 cookie example.com_name check port 8080 inter 1000


listen stats :1936
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth haproxy:password

Can the above is possible to do with NGINX?.

Thanks,
Subject Author Posted

Can we replace HAProxy with NGINX

lchennup March 16, 2017 06:37PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 322
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready