Proxy Pass

  • Hi,
    I'm new to OMV and to linux,
    I setup an OMV box on a home server last week and I run into some issues about nginx and proxy pass.


    When I try to activate nginx plugin I got an error :


    Failed to execute command 'export LANG=C; nginx -t 2>&1': nginx: [emerg] "server_names_hash_bucket_size" directive is duplicate in /etc/nginx/conf.d/openmediavault-nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed


    content of /etc/nginx/conf.d/openmediavault-nginx.conf


    server_names_hash_bucket_size 32;




    when I try to activate proxy pass for e.g. subsonic I have another error message :


    Failed to execute command 'omv-mkconf subsonic getsettings': nginx: [emerg] "server_names_hash_bucket_size" directive is duplicate in /etc/nginx/conf.d/openmediavault-nginx.conf:1


    here is the content of /etc/nginx/openmediavault-webgui.d/sub.conf


    location /subsonic {
    proxy_pass http://localhost:4040/subsonic;
    #proxy_set_header Host localhost:4040;
    proxy_set_header Host ;
    proxy_redirect default;
    }


    I tried to remove nginx and reinstalling, still the same problems.


    I have the same proxy pass problem on every plugin where I can activate it (sabnzbd...)


    If anyone has any idea for these bugs, I'd like to have access to differents plugins this way : mydomain.com/servicepluginname or servicepluginname.mydomain.com and not having to remember and open all ports on my router.


    thanks for help :)

  • Hi thanks for your answer but I I said I have the same problem with all plugin where I can activate proxy pass :


    here after trying to activate proxy pass for sickbeard :


    server_names_hash_bucket_size" directive is duplicate in /etc/nginx/conf.d/openmediavault-nginx.conf:1


    still the same error, I can try with another plugin but I think i'll get the same.
    I even tried to comment the only line in /etc/nginx/conf.d/openmediavault-nginx.con:1
    still the same as the line gets uncommented when I click apply


    any other idea ?

  • The duplicate directive is in /etc/nginx/nginx.conf but the value is here 64


    If I try to comment the line in /etc/nginx/conf.d/openmediavault-nginx.conf it reverts back to uncommented when I click apply in webgui

  • yes thanks subzero that was the one to comment :)


    I can now open mydomain.com/subsonic or /sickbeard but I had a problem with sabnzbd so I modified the sab.conf file and I didn't activate it with the webgui, all is working.


    Maybe if I can ask a little more thing, I installed roundcube plugin to access to my emails, I can access it with mydomain.com/webmail/
    the problem is that for having this adress I had to redirect port 80 to my omv but if I go to mydomain.com it opens the webgui login page wich I don't want


    is there a way to move roundcube to another port and continue accessing it with mydomain.com/webmail/ ??

    • Official Post

    I am not familiar is with the round cube plugin, for your case I don't think that's an option, you'll have to mod the omv nginx file. You're gonna get in trouble probably.
    If you have a domain why don't use a prefix instead?
    roundcube.domain.com with proxy pass to roundcube webui
    And if someone tries to access domain.com put a proxy pass that points nowhere.

Participate now!

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