A few weeks ago I moved my self-hosted Appwrite instance behind a reverse proxy (using Nginx Proxy Manager) - I just noticed that if I go into Auth > User > Sessions, the IP address being reported is the private IP address and so location is always unknown. It looks like Appwrite isn't getting the correct IP address. Is this an Appwrite configuration that I just missed or is this something that I need to do on the NPM side?
I already have this added to the docker-compose.override.yml file. Should this be added to the main docker-compose.yml file instead?
Here's my docker-compose.override.yml:
version: '3'
services:
traefik:
command:
- --accessLog=true
- --providers.file.directory=/storage/config
- --providers.file.watch=true
- --providers.docker=true
- --providers.docker.exposedByDefault=false
- --providers.docker.constraints=Label(`traefik.constraint-label-stack`,`appwrite`)
- --entrypoints.appwrite_web.address=:80
- --entrypoints.appwrite_websecure.address=:443
- --entrypoints.appwrite_web.forwardedHeaders.trustedIPs=IP_MASKED_IN_THE_SCREENSHOT
- --entrypoints.appwrite_websecure.forwardedHeaders.trustedIPs=IP_MASKED_IN_THE_SCREENSHOT
networks:
gateway:
name: npm_gateway
external: true
NPM is accessible through proxy.domain.com - but somehow if I put the IP address on the browser's address bar, it doesn't show NPM.
When accessed as http://IP_MASKED_IN_THE_SCREENSHOT, I get: 404 Not Found openresty. If accessed as https://IP_MASKED_IN_THE_SCREENSHOT, I get: ERR_SSL_UNRECOGNIZED_NAME_ALERT.
uhhh the ip address that's shown in appwrite...isn't tha the ip address of NPM?
When I look at any user's sessions, it shows 172.22.0.2 which is a private internal IP. It's probably the IP of NPM, should I use this IP instead of the static public IP?
Okay when I used the private IP instead of the public IP, it worked. Thanks!
[SOLVED] Reverse proxy settings
Recommended threads
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...
- User ID case sensitivity
I see that through REST (and SDK as well), getting a user is not case sensitive. And even though documentation does not clearly state that it is, the wording "V...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...