Trying to convert Taiga nginx configuration

Hello there ! :slight_smile:

I’m currently installing taiga on one of my servers and I’m quite stuck right now with the configuration.

The configuration looks like this in nginx :

server {
    [...]
    location / {
        root /home/taiga/taiga-front-dist/dist/;
        try_files $uri $uri/ /index.html;
    }

    location /api {
        [...]
    }

    location /admin {
        [...]
    }

    location /static {
        alias /home/taiga/taiga-back/static;
    }

    location /media {
        alias /home/taiga/taiga-back/media;
    }
}

Now for both proxies (/admin and /api), I know how to do that, and it’s pretty easy using caddy. What troubles me is the multiple location. How can I achieve that using Caddy ? The full configuration file can be found here. I guess that question was already asked a lot of times but I can’t seem to find an explanation :confused:

Could anyone help me ? :slight_smile:
Thanks a lot in advance

Ok, fixed that using two additional subdomains (one for media and one for static)

The configuration file looks like this :

taiga.example.com {
	root /home/taiga/taiga-front-dist/dist/
	
	proxy /api 127.0.0.1:8001 {
                header_upstream Host {host}
                header_upstream X-Real-IP {remote}
		        header_upstream X-Scheme {scheme}
                header_upstream X-Forwarded-Proto {scheme}
        }

	proxy /admin 127.0.0.1:8001 {
                header_upstream Host {host}
                header_upstream X-Real-IP {remote}
		        header_upstream X-Scheme {scheme}
                header_upstream X-Forwarded-Proto {scheme}
        }
}
static.taiga.example.com {
	root /home/taiga/taiga-back/static/
}
media.taiga.example.com {
	root /home/taiga/taiga-back/media/
}

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.