OMV 6 has html base tag, preventing use under a subfolder

  • I just upgraded to OMV6, and everything is working, except I can't access the Web-UI under /omv/.

    I get a blank, blue screen, and multiple 404 errors in the development console trying to load the js scripts.


    I've seen many threads on this topic, but none of them are relevant.

    It's running on port 81, and I can access everything else (portainer, and other docker services), just fine under their respective subfolders.

    I use the built-in nginx, not a docker container, and have a custom proxy conf under sites-enabled.


    After searching for a bit, the issue is the fact the index.html page has <base href="/"> in the header section. This is incompatible with subfolder proxying.

    You can see that line here: https://github.com/openmediava…rkbench/src/index.html#L6


    We need a configuration option to set the subfolder path, like other applications have.



    EDIT:

    I was able to work around this by using the following in my proxy config:

    Code
        location / {
            root   /var/www/html;
            index  index.html;
    
            # Lines below were added
            if ($http_referer ~* (/omv/) ) {
                rewrite ^/(.*)$ /omv/$1 redirect;
            }
            rewrite ^/assets/(.*)$ /omv/assets/$1 redirect;
        }


    Downside is this can conflict with the root path (particularly the last line with assets). It doesn't for me, but it's a very hacky solution.

  • chente

    Approved the thread.
  • KM0201

    Approved the thread.
  • The panel isn't really designed to be accessed over the Internet. It's not difficult to pull off of course, but it's really meant to be used locally.


    I can access mine via subdomain no problem however (never cared much for subfolder)

  • The panel isn't really designed to be accessed over the Internet. It's not difficult to pull off of course, but it's really meant to be used locally.


    I can access mine via subdomain no problem however (never cared much for subfolder)

    I'm not.


    I mean, I can, but in this case, this is local. I just don't want to go to a million different ports, and subdomains won't work for me.

  • We need a configuration option to set the subfolder path, like other applications have


    I just upgraded to OMV6, and everything is working, except I can't access the Web-UI under /omv/.

    I get a blank, blue screen, and multiple 404 errors in the development console trying to load the js scripts


    but in this case, this is local.

    If you are only accessing it locally, what's the idea and difficulty?

    If your DNS is working proper, all you need to write is http://hostname on the LAN. (With :<port> if not on 80


    Or make an alias on the host file.


    Using a redirect proxy for subfolder implies WAN Access (with SWAG maybe?!?).

    The framework used on OMV6 doesn't allows this.

    Several attempts were tried but, since most of us, use sub-subdomain ( and it works) noone kept trying to get it working (me inclusive)


    If you NEED, then try to find a way.

    I'm sure devs won't revert to omv5 framework for something like that.


    See linuxserver's reverse-proxies subfolder samples to see if you find one that can work on your case scenario.

  • For the record, I use BIND server, with DNS self-registration from hosts. Adding a subdomain there is possible, sure, but a lot of extra hassle when the current system hasn't had a problem in 20 years.

    Editing a hosts file isn't an option, I'd have to edit it on every client.


    Was there some discussion here about the angular limitations, and what was researched?

    I haven't used angular myself, but I found this (https://symflower.com/en/compa…path-independent-angular/), and wondered if there was some roadblock that might prevent what's documented here from working?


    The WeTTY plugin (among others) suffers the same limitation, but upstream supports it, so I deployed it docker, since the plugin offers zero-customization.

    It seems I'm clearly in the "you're using it wrong" crowd.


    Now for the rant:

    I'm sorry to be so blunt, but OMV (6 in particular, though 5 has its issues) is the most user-hostile piece of software I've ever used. The reduction in functionality, followed with "we don't do that, so we don't care" is horrible.

    This is following the recent threads regarding the extra confirmation checkbox. I guarantee that checkbox won't make a bit of difference in the long run. When every single action is "ZOMG DEATH ARE YOU SURE?" all you successfully do is teach users that the warnings and confirmations are useless and to plow through them without reading, I know I already do. The extra checkbox should be for actual instances where there's a good risk of losing data or locking yourself out of the system. Look at TrueNAS for an example of a properly implemented UX. They have a confirmation that looks nearly identical to OMV, but it's limited to only a few cases where it's really important to pay attention.

    If TrueNAS Scale was more ready for prime-time, I'd switch in a heartbeat. Despite the superior UI/UX, it has some glitches I found during testing which don't make the switch worth it for me at this time.


    It's clear users are not a factor for development. I say that as a developer myself. If it were just limitations or whatnot, that would be understandable, it's the "my way is superior, and it's my way or the highway" attitude that is a turn off.


    I suppose the only option is to fork it and fix it myself, clearly that's the only way for users to be taken seriously.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!