NS_ERROR_REDIRECT_LOOP with caddy and nginx in docker container

Discussão em 'Angular' iniciado por Morty, Janeiro 3, 2025.

  1. Morty

    Morty Guest

    I am strugling with my Configuration for a while now and i always get the Redirect Loop error in Browser. I am running Caddy in docker and an Angular Application with the nginx image also in Docker. When i am calling my URL in the Browser i get the to many redirects error, i am getting redirected from https to http and back to https until i get the NS_ERROR_REDIRECT_LOOP.

    What am i doing wrong?

    Caddyfile:

    hotel.luluflu.com {
    reverse_proxy hotel-client:80
    }


    nginx.conf:

    events {
    worker_connections 1024;
    }
    http {
    include /etc/nginx/mime.types;
    server {
    client_max_body_size 128M;
    listen 80 default_server;
    server_name ${HOTEL_CLIENT_NAME}
    listen [::]:80 default_server;
    root /usr/share/nginx/html;
    location /api {
    proxy_pass ${HOTEL_CLIENT_SERVER_URL};
    }
    location / {
    try_files $uri $uri/ /index.html;
    }

    }
    }


    Setup:

    • caddy version 2.7
    • Nginx Version: 1.27.3

    Browser log: [​IMG]

    I hope anybody can help, btw, i can ping the client container from caddy container.

    Continue reading...

Compartilhe esta Página