Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

azure container app

$
0
0
Hi all,

We are carrying out tests to make API requests for a service which is located in a container environment under Azure.
To request this service we use the nginx solution. The service we question and mimir de grafana.

My problem is the following:
When the proxy_pass contains the target hostname, I get the 403 error.
When the proxy_pass contains the target IP, it works
On the nginx command console, when I curl target hostname, it works.
I can't leave the IP address, because it is a dynamic IP address.
From nginx I can clearly see the call arriving, however I don't see anything on the target (mimir).

this the config of nginx:

worker_processes 1;

events {
worker_connections 1024;
}

http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;
server_name localhost;

location /prometheus/api/v1/ {
proxy_pass http://mimir_service/prometheus/api/v1/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

add_header 'Access-Control-Allow-Origin' '*';
proxy_redirect off;
proxy_set_header X-NginX-Proxy true;

}
}
}

An idea of problem ?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>