Replies: 1 comment
-
Solved it: Needed to add to docker compose of server to be able to access localhost. extra_hosts: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Folks,
I've inherited a server, unfortunately it's installed with plesk which is causing no end of headaches due to their time saving "features".
My home authentik server i use Forward Auth (domain level) with standalone nginx and works great.
The plesk nginx does now have auth request module installed....
In the hopes of not needing to reinstall nginx with the module (in fear of breaking more of plesk). I decided I'd just forward to authentik and let it handle the proxying to the locally running web app (Java app using spark library on port 8081)
My "additional nginx directives" on plesk has (wouldnt let me use location / so settled for this):
location ~ ^/.* {
proxy_pass http://localhost:9000;
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;
}
And then authentik side I've got external host to be https://domain.co.uk
internal host http://127.0.0.1:8081/
However when i try logging in i get Bad Gateway Failed to connect to backend.
And in chrome dev toos I can see server responded with status of 502.
However if I change the original nginx reverse proxy to go directly to the 127.0.0.1:8081 the webapp shows up no problem so i know it running, it's just not getting through authentik for some reason.
My only guess was maybe 127.0.0.1 was going to dockers own little network rather than main host localhost?
Any ideas/suggestions
Beta Was this translation helpful? Give feedback.
All reactions