trafice redirect issue from nginx to prometheus with 404 error (docker)

Both Nginx and Prometheus are deployed on Docker, with below nginx config file, the prometheus location is not accessible with error “404 page not found”
The Prometheus container is acesible from nginx container with curl and ping

server {
    # https://ypereirareis.github.io/blog/2020/02/18/how-to-reduce-nginx-502-bad-gateway-errors-risks-with-dynamic-domain-name-resolution/
    resolver 127.0.0.11 valid=30s;
    set $upstream_endpoint django:8066;
    set $prometheus_endpoint prometheus:9090;
    error_page 502 /static/502.html;

    listen 80;
    listen 443 ssl;
    ssl_certificate ******;
    ssl_certificate_key ******;

    charset utf-8;
    client_max_body_size 0;
    client_body_buffer_size 128k;
    server_tokens off;
    sendfile off;

    gzip on;
    gzip_disable "msie6";
    gzip_types application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xm>

    location /static {
        alias /static;
        autoindex off;
        expires 30d;
    }

   location / {
        proxy_pass http://$upstream_endpoint;
        client_max_body_size 0;
        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_connect_timeout       1200;
        proxy_send_timeout          1200;
        proxy_read_timeout          1200;
        send_timeout                1200;

        aio threads;
    }

    location /prometheus {
        proxy_pass http://$prometheus_endpoint;
        client_max_body_size 0;
        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_connect_timeout       1200;
        proxy_send_timeout          1200;
        proxy_read_timeout          1200;
        send_timeout                1200;

        aio threads;
    }


    # HTTP to HTTPS redirect
    if ($scheme = http) {
        return 301 https://$host$request_uri;
    }
}

The compose file:

services:
  prometheus:
    build: docker/prometheus
    command:
      - "--log.format=json"
      - "--config.file=/etc/prometheus/prometheus.yml"
      - "--storage.tsdb.path=/prometheus"
      - "--web.console.libraries=/usr/share/prometheus/console_libraries"
      - "--web.console.templates=/usr/share/prometheus/consoles"
    restart: "always"
    volumes:
      - prometheus_data:/prometheus
    networks:
      - proxy-tier

  nginx:
    build:
      context: docker/nginx
    restart: "always"
    depends_on:
      - django
    volumes:
      - cache_media:/var/media:ro
      - static_files:/static:ro
      - "./docker/nginx/certs:/etc/nginx/ssl:ro"
    ports:
      - "80:80"
      - "443:443"
      - "9090:9090" # Prometheus dashboard
      - "3000:3000" # Grafana interface
    networks:
      - proxy-tier
    environment:
      - DOMAINNAME_CLOUD_SERVER

volumes:
  cache_media:
  static_files:
  prometheus_data:

networks:
  proxy-tier:
    driver: bridge

secrets:

The similar location ( the location above prometheus in nginx config file / ) is working, the application on the django is deployed on docker as well

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật