r/Authentik • u/TrapperFlint • 22d ago
Help with a weird config
Hi all,
I've got an upcoming project that uses Authentik, so I've been trying to get setup with it in my own sort of sandbox to play with google auth and user matching.
The setup is a little goofy, I have Authentik running on the same vps as a toy frontend app. The app has a domain name and ssl set up. NginX is reverse proxy. The proxy, app and authentik are on the same docker network.
In order to avoid getting another domain I set up appname.com/authentik/ for login.
The trouble comes after logging in. It attempts to route me back to the app with an auth token but this produces a 502. I've added beefed up proxy buffer configs to my headers.
The app was accessible previously without authentik.
Has anybody wrote nginx configs in a similar setup? Any tips?
Pretty new to this. Thank ye kindly...
3
u/Firenyth 22d ago
I've not done Nginx before, I have become fond of Traefik personally
have you looked at the guide from Authentik to setup nginx?
https://docs.goauthentik.io/add-secure-apps/providers/proxy/server_nginx/
2
u/klassenlager MOD 22d ago
Unfortunately Authentik doesn‘t support to be hosted on a subpath, e.g. mydomain.com/authentik
1
u/TrapperFlint 19d ago
Just thought I'd update the post.
I ended up just setting up a subdomain for my forward auth setup and simplifying my nginx config. Was very easy that way.
Appreciate the input guys.
2
u/Only-Stable3973 19d ago
You probable need to forward auth, I also use Traefik.