Questions tagged [nginx-reverse-proxy]

When a reverse proxy proxies a request, it sends the request to a specified proxied server (http or other), fetches the response, and sends it back to the client, as if it came from the reverse proxy itself.

More information: https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/

2738 questions
0
votes
0 answers

Nginx microservices configuration

I have many frontend microservices and I wanted to have a single entry in nginx that would solve them all. Example of microservices I have: budget-client stock-client To differentiate, each service is forwarded to a service following the following…
0
votes
2 answers

How to set nginx proxy path to use static contents of a specific s3 bucket folder?

I'm working on an nginx reverse proxy container image to proxy frontend files from s3, and Im trying to access these files from a specific folder location, instead of just the base path of the s3 bucket. As of yet I can only serve up the index.html…
0
votes
1 answer

Spring Boot 3.0.0 not working on Reverse Proxy

I have a Spring Boot application running behind a NGinx reverse proxy and after I've upgraded Spring Boot version from 2.7.0 to 3.0.0 I'm getting a 404 error. NGinx Reverse Proxy: location /cpoprocesscontrol { proxy_pass …
Aldo Inácio da Silva
  • 824
  • 2
  • 14
  • 38
0
votes
0 answers

Nginx - service crashes if upstream backup servers' hostname cannot be resolved

Setup: Docker compose Nginx v1.15 Config file: http { upstream backend { server my_production_server1:80 fail_timeout=5s max_fails=3; server my_production_server2:80 backup; } ... } Problem: if my_production_server2 container goes…
0
votes
0 answers

how to expose multiple subdomains without port by Nginx reverse proxy in the same server?

I want to expose multiple subdomains without port numbers in the same server. I currently have multiple reverse proxies on sites-enabled on nginx that I would like to expose all http traffic to https. server { listen 9320; …
0
votes
0 answers

Nginx proxy reverse out port

I want to define out port of my nginx server. Actually some thing like port forwatding by iptables in nginx. Request: Client via(ip:port) send to nginx(ip:80). Nginx via( nginx ip:client port) send to server B(ip:80). Response: Server B via(ip:80)…
0
votes
0 answers

Setting cookie domain from return url in nginx reverse proxy

I have a web app on domain a.com, that requires authentication via a sso service with a return in the url on domain b.com. the sso service receives the request from the browser, and returns a cookie to the return url specified in return…
0
votes
0 answers

I need to host my react app on my domain and my api on my subdomain with Nginx on the Ubuntu server and Nginx on Docker

So basically, I have two Nginx processes. One runs on an ubuntu server itself (20.04 LTS) (for the frontend), and the other runs on docker on the ubuntu server (for the backend). I have created a server block for both the front end and the backend…
0
votes
1 answer

Nginx resverse proxy for prams in an expressjs application

I have got a route in expressjs application with the following code. ... router.get("/:id", async (req, res, next) => { try { // debug(`The req is ${req.params.id}`); const data = await getSuperHerors(req.params.id); …
Joseph Shanahan
  • 197
  • 1
  • 1
  • 10
0
votes
0 answers

FastAPI served through NGINX with gunicorn and docker compose

I have a FastAPI API that I want to serve using gunicorn, nginx and docker compose. I manage to make the FastApi and Gunicorn work with docker compose, now I add nginx. But I cannot manage to make it work. When I do curl http://localhost:80 I get…
Escachator
  • 1,742
  • 1
  • 16
  • 32
0
votes
0 answers

How to check if a word includes in whole url in nginx

I have same domain. I want to redirect anything starting with /v2/xyzz/abcc to new admin proxy but it still redirects to / here is my nginx. domain.com/v2/as/as/asss -> new_admin domain.com/ -> to old_admin upstream new_admin { server…
0
votes
0 answers

how to redirect to 404 error instead of 403 when user enter wrong subdirectory in nginx?

I am using nginx as my webserver and what I want is to redirect user to 404 error instead of 403 when user enter a wrong subdirectory,how can I do this .below is my nginx server section conf : server { …
Ali farahzadi
  • 274
  • 2
  • 10
0
votes
0 answers

Override `proxy_set_header` with `set_by_lua_block`

I want to be able to override a value of a header sent to my backend, which would be established with proxy_set_header at later stages. If I understood correctly it's not possible to achieve with a second call to proxy_set_header. I can't use…
Philipp Grigoryev
  • 1,985
  • 3
  • 17
  • 23
0
votes
1 answer

Can I configure nginx with proxy_pass to use an error document on the proxied server?

I've configured nginx with proxy_pass to proxy URLs like /uploads/foo.png to fetch from an S3 bucket, but obviously missing files result in ugly XML errors, and I want to return a static HTML file. I tried using the "static website" feature of S3,…
Steve Clay
  • 8,671
  • 2
  • 42
  • 48
0
votes
0 answers

NGINX Docker reverse proxy not working on server (Works locally)

I am running a Django app on Docker with Nginx, the configuration works perfectly locally but on the server, it doesn't. i get the error 502 Bad Gateway in the web page and the logs I get 2023/01/13 07:55:56 [error] 28#28: *1 connect() failed (111:…