bfabiszewski / ulogger-server

μlogger • web viewer for tracks uploaded with μlogger mobile client
GNU General Public License v3.0
522 stars 85 forks source link

Serving from reverse proxy at different path #145

Closed MagicRB closed 3 years ago

MagicRB commented 3 years ago

I need to have ulogger accessible at https://example.com/ulogger, that address is proxied to http://someaddress.com/. ulogger correctly detects that it's running behind a proxy, because it redirects to https://example.com/, but it's still missing the /ulogger part. Am I missing a header or something? or is it just that ulogger doesn't handle this case properly

bfabiszewski commented 3 years ago

How did you set up the proxy? The problem is that µlogger detects base path from the server variables. The variables on the server where it is installed does not contain the /ulogger part. Maybe you could fix it by rewriting path when forwarding requests?

Generator commented 3 years ago

Also having issues with reverse proxy

    location ^~ /ulogger {
        proxy_pass  http://ulogger/;
        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_redirect          off;
    }

When try to open domain.com/ulogger redirects do domain.com/uloggerlogin.php (without '/').
When open the current URL domain.com/ulogger/login.php after login redirects to domain.com

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.