Welcome! Log In Create A New Profile

Advanced

Nginx Very slow if i use proxy pass in HTTPS via reverse proxy

Posted by rocco.fimmano97 
Nginx Very slow if i use proxy pass in HTTPS via reverse proxy
January 10, 2024 05:19AM
Hi,
i've implemented a Reverse proxy with nginx but i've a problem, when i connect into my device via reverse proxy the device is very slow, i've tried to set the keepalive but the problem persists, the only solution is to use the protocol http in proxy pass but is not a good idea.

This is mi configuration:

location /rp/@testdevice@/ {
auth_request /_autentication_test/21222;
error_page 401 /40x.html;

resolver 127.0.0.1 valid=30s;
set $upstream_rp_21222 x.x.x.x;
proxy_pass https://$upstream_rp_21222;

#proxy_pass https://x.x.x.x/;
rewrite ^/rp/@testdevice@/(.*)$ /$1 break;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Accept-Encoding "";
proxy_ssl_verify off;
proxy_cookie_path ~*^/.* /rp/@testdevice@/;
subs_filter_types *;
subs_filter "http://x.x.x.x/test/" "//@testdevice@/test/";
subs_filter "https://x.x.x.x:8443/" "/rp/@testdevice@/";
subs_filter "https://x.x.x.x:443/" "/rp/@testdevice@/";
subs_filter "https://x.x.x.x/" "/rp/@testdevice@/";
}


upstream xxx.xxx.xxx.xxx_443 {
server xxx.xxx.xxx.xxx:443 resolve;
keepalive 15;
keepalive_timeout 10s;
}

The nginx version is 1.25.3

Please help me :(
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready