How can i achieve nginx proxy_pass $scheme://$http_host$uri$is_args$args; in haproxy

How can i achieve nginx proxy_pass $scheme://$http_host$uri$is_args$args; in haproxy

Is this possible achieve this in haproxy?

You don’t have to do anything like this, haproxy will pass the request as is to the backend.

I don’t want hard code any back end server… is it possible to forward whatever request through pxoxy.?

Hi,

Can you help me how to configure without hardcoding bakend server?

Where do you want the HTTP request to be forwarded to if you don’t configure a backend server?

My Nginx Configuration:
#transparent http proxy
server {
listen 10.200.210.32:6090;
server_name localhost;
access_log off;

    location / {
        proxy_http_version 1.1;
        proxy_pass $scheme://$http_host$uri$is_args$args;
    }

}

For HaPxoxy: How can can it be done without hardcoding beckend server…by only forwarding to hdr(host)?

You cannot do this with haproxy. Haproxy is not a forwarding proxy (neither is nginx).

global
daemon
maxconn 256

defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms

frontend http-in
bind 192.168.192.35:6090 transparent
default_backend servers

backend servers
server server1 10.58.187.153:80 maxconn 32

backend Forward address is keep on changing for my case…so I don’t want to change the back end server every time and restart the haproxy…

In nginx case I don’t need to do anything…it works with default http_host…

Pls suggest me any way I can do it same way in haproxy?

Like I said, its not possible. This is not what haproxy was made for. Haproxy is a reverse proxy.