Web UI - Changing Web Root

I assume you mean changing my port. What makes you believe it’s a port issue? I can get the reverse proxy to work just fine if I don’t try and redirect an external subdirectory to an internal root directory.

I may just have to leave it at that, but I really wanted to get all my internal services broken down in sub directories in my reverse proxy.

By your example, you seem to want to have MineOS listening on 8443 and your reverse proxy listening on 8443. This is what makes me believe it’s a port issue.

So again, consider the following really simple scenario. Reverse proxy listening on :8443/mineos and it redirecting its traffic to mineos internally to localhost:12345/.

Why wouldn’t that work?

Sorry, I thought I corrected that misconception in one of my replies.

#Desired setup

External:
https://mydomain.com/mineos

Internal
https://internal-ip:8443/mineos

#Current (working) setup

External
https://mydomain.com/

Internal:
https://internal-ip:8443/

If I just try and redirect /mineos (by changing the location), mineos is not aware of the redirection that is taking place and the responses are not correct. So I can get a logon screen, but the auth screen fails because mineos isn’t aware of the reverses proxy headers.

I’ve tried (for probably 4 hours) to try and get the redirection working with rewrites / substitutions, and not having any luck. Out of my 7 applications that are using my reverse proxy, only mineos and one other have issues being redirected.

Then don’t you just want this?

location /mineos {
  proxy_pass https://localhost:8443/;
}

I sure do, but try it, it doesn’t work. Response back from MineOS does not take into account the /mineos and so it terminates after serving what ever page i manually requested.

For example, using that setup, i could request the logon page (https:mydomain.com/mineos/admin/login.html) but once I send my authentication it alters the response to remove the /mineos/ and therefore doesn’t get displayed.

So something that passes the headers then like:

location /mineos {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-NginX-Proxy true;

    proxy_pass https://0.0.0.0:8443/;
    proxy_redirect off;

    # Socket.IO Support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Was a no go, same issue. I got logon screen and as soon as I login, it removes the /mineos/ from the url it stops working.

Thanks for trying, for now I guess I’ll just leave it at the root of my reverse proxy. Would be nice, if you guys want to consider it, for having a custom url in the mineos.conf

sorry to resurrect an old thread. but I’m trying to redirect domain.com/mineos to IP:8443. I tried this code but I get:

Cannot GET //

I feel I’m close though- help please

Hi,
I’l having the same problem. I would like to have MineOS on [myddns]/mineos like you, but I can’t figure out how to do it.
If anyone has an idea, don’t hesitate to share !
Thanks in advance
Have a great day