Questions tagged [nginx-upstreams]

50 questions
1
vote
0 answers

nginx proxy_next_upstream works weird

nginx's proxy_next_upstream works weird. I want to pass to the next server when the upstream which proxy to other country fails to return request. So I set upstream(proxy-to-other-country) like this. upstream proxy-to-other-country { server…
JYS
  • 11
  • 4
1
vote
1 answer

Nginx Consistent Hashing for Multiple Upstreams

The Upstream server is wowza. There are two upstreams upstream wowza { hash $arg_streamKey consistent; server x.x.x.x:8087; server x.x.x.y:8087; } upstream wowza_thumbnail { hash $arg_streamKey consistent; server x.x.x.x:8086; …
maddygoround
  • 2,145
  • 2
  • 20
  • 32
0
votes
0 answers

Nginx - How to get the count of requests handled by each upstream IP in the upstream block?

upstream test { server ip1:port1; server ip1:port2; server ip1:port3; server ip1:port4; } location / { set $dst test; proxy_pass http://$dst; } Approach - Initially in the database, I stored the request count of each…
0
votes
1 answer

nginx not connecting to puma upstream

I've setup a puma server for a rails app and an nginx upstream directive but it's not routing correctly. I'm on Ubunutu 22.10 root@kapelner-gradesly:~/deploy/gradeportal/current# lsb_release -a No LSB modules are available. Distributor ID:…
0
votes
1 answer

Nginx to secure traffic

I'm trying to set-up a Nginx to secure external traffic to a docker service. My intention is to create a proxy with SSL certificates (letsencryptit) listening on the external IP, then route requests to different servers inside docker containers. So…
GonAlonso
  • 3
  • 2
0
votes
0 answers

Configuring upstream server for nginx reverse proxy with angular built app

I am trying to configure a reverse proxy for nginx to serve an angular site but am struggling with the upstream server. All of the info I have found researching indicates that nodejs should be running locally on the ubuntu vps (usually at…
0
votes
0 answers

Set Target Kong with Domain in HOST

I developed a new plugin that basically receives a call and directs it, according to some criteria, to a configured target. To accomplish this targeting, I'm using kong.service.set_target("server.server", 80) With that I get an error similar to…
0
votes
0 answers

NGINX does not resolve the upstream-block

NGINX does not resolve the upstream-block in a reverse proxy and load-balancing application. I've two server running with ubuntu 22.04.2 LTS. Each of them are in a local network with IP 192.168.2.100 and .101. Nginx is the version 1.18.0 (ubuntu) On…
Werner
  • 1
  • 2
0
votes
0 answers

Nginx Upstream Block Breaks SSL Handshake

I currently use nginx as an HTTP->HTTPS proxy. I am trying to modify my nginx config to use an upstream block for the purpose of enabling keepalive connections. However, for some reason using the upstream instead directly writing the address into…
0
votes
0 answers

NGINX use the main upstream server when it is marked as temporary disabled

I set up two upstream servers as failover in my nginx upstream backend { server 10.0.0.10 fail_timeout=48h max_fails=1; server 10.0.0.20 backup; keepalive 25; } server { listen 80; server_name _; client_body_buffer_size 500M; …
0
votes
0 answers

Proxy pass to the upstream is returning incorrect response code [404]

Proxy pass to the upstream is returning incorrect response code [404] even though the request is a success [200] from the backend. upstream backend { server host; } server { listen 80 default_server; server_name _; …
0
votes
0 answers

Increase in the number of connections gives 504 gateway timeout error in Nginx

I have a mail server running nginx. Whenever the number of connections increase, nginx fails and give Upstream connection error in the error.log. On the browser, it gives 504 Timeout error. How can I resolve this? I have checked the resources that…
hamza toor
  • 11
  • 2
0
votes
0 answers

How to automatically update nginx upstream server list(privateip:80) when i create AWS instance

This is my nginx upstream backend config, upstream backend { #ip_hash; server unix:/run/gunicorn.sock; server private_ip:80; server private_ip:80; server private_ip:80; server private_ip:80; server private_ip:80; } After…
Vamshi
  • 11
  • 2
0
votes
0 answers

Print upstream URL in nginx access logs

I have a group of upstream servers,I have been trying to print the upstream URL in the access logs where the request went to. I tried proxy_host and upstream_addr. But they didn't solve my issue. "proxy_host" prints the upstream name, not the URL,…
batman
  • 1
0
votes
0 answers

Nginx: Reverse Proxy: When it considers an upstream node/cluster unavailable?

Basically I want to understand 2 things- Nginx considers an upstream node unavailable only if it is not able to connect to it or if it is not able to get a response for a request with in proxy_read_timeout too (every where in docs, it is mentioned…