Skip to content

Sub-folder URL access 502 Bad Gateway #148

@JFPCreations

Description

@JFPCreations

Hi,

I have this problem and can't find the solution.

I can access Snapp from my https://www.domain.tld and http://ip:port
If I click on the login image it goes to login and after login it goes to dashboard, all good here.
But not if I go to http://ip:port login does nothing, not my most important problem.

The big problem is after login, if I try to load a sub-folder page directly in the address bar is does 502 error.
Exemple:
https://www.domain.tld - works
https://www.domain.tld/metrics - works

https://www.domain.tld/dashboard - 502
https://www.domain.tld/dashboard/tags - 502
https://www.domain.tld/groups- 502
https://www.domain.tld/users - 502

But my created URL shortened link work https://www.domain.tld/mytest goes where it should go.

But they all works if I click the link in the left panel of the dashboard.

I use nginx for my reverse proxy, might need something added or remove from my conf...

`server {
server_name www.domain.tld;
access_log /var/log/nginx/www.domain.tld.log;
error_log /var/log/nginx/www.domain.tld.error;

location / {
proxy_pass http://ip:3000;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-Port $remote_port;
}

location /.well-known {
alias /var/www/html/sub.domain.com/.well-known;
}

listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
http2 on;
ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem; # managed by Certbot
}

server {
if ($host = www.domain.tld) {
return 301 https://$host$request_uri;
}

listen 80;
listen [::]:80;

server_name www.domain.tld;
return 404; # managed by Certbot
}
`

Nothing in the docker log:

Listening on http://0.0.0.0:3000
undefined
undefined

I'm not sure if all I say is understandable but thank you.

I just tested with snapp.domain.tld and it does the same.

Furthermore, I have a lot of other apps in docker running and working with this kind of reverse proxy in nginx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions