Simple fast daemon host webgui access [Nginx]

  • Hi,


    Nice guide! I've tried to use it to get plex, couchpotato, sickbeard to be accessed on mydomain.com/sickbeard etc instead of mydomain.com:8081. Should I write just couchpotato instead of "sb.lan" or what does the .lan point to?


    How do I restart the deamon?


    This part I don't understand, care to explain more?

    Zitat

    The custom dnsmasq entries can be setup in openwrt in the /etc/config/dhcplist address '/sb.lan/10.10.10.12'
    list address '/sb.lan/10.10.10.12'
    That ip address is the static for OMV.

    • Offizieller Beitrag

    .lan is a custom local domain, sometimes people use .local or whatever they want. This is configured in the router to provide domain for everyone inside the LAN.


    nginx daemon restart is /etc/init.d/nginx/ restart


    Zitat

    This part I don't understand, care to explain more?


    Imagine I have several PC's in my lan, how do they will know how to reach http://sb.lan or http://cups.lan that is located at my OMV? They need to refer to a local DNS resolver, so you need to point that address into an ip address. Each browser is going to consult the address first in the local DNS server (typically 192.168.1.1). This only happens if your router is setted to intercept all DNS traffic. In this case openwrt is a router with a 3rd party firmware.
    If by chance you don't have a router which you can add dns entries, you can point the address in each PC by editing the host file (windows, mac, linux)

  • I don't really understand the nginx part of this tutorial. Im a noivice with this stuff. How exactly do I need to configure nginx and what role does it play in this?

  • So I don't have to configure the nginx plugin? I just interact with nginx via command line inputs? What about the DNSmasq plugin? What is that for? Do I have to do anything there?


    I appreciate the guide. I am novice here, but i'd really like to get this working. =)


    Thanks,

  • Coru, I'm not sure if you understand it correctly. Apache and nginx are webservers. If you want to host a website it needs to run on a webserver. OMV's pages run on nginx. Anything you access via http/https with a browser is being hosted by a webserver. Is there something you want to run that needs to have web pages hosted by a webserver????


    If you do not need to host a website, or use a non plugin package that needs to host a website, you do no need this plugin.

  • This can be done in ddwrt in the services tab I have set a static IP to my omv using its mac address then by using the Additional DNSMasq Options in the services tab I have created multiple hostnames to the omv IP.


  • Congrats Subzero, nice guide. Well explained but I can't figure out how to proxy_pass my OpenVPN login page (running on port 943) to mydomain.no-ip.org/VPN/


    I also tried to serve my Wordpress site from the Nginx plugin on another port different from the 80 (of the OMV web interface) to be able to "close" the web interface to the public so they could only access the wordpress site when typing mydomain.no-ip.org/blog/ for example.


    Thanks in advance.


    EDIT: following your shellinabox example, my multi_host file should look like this, or not?

    Code
    #OpenVPN
    server {
        server_name gsola96.no-ip.org;
        listen [::]:80;
        location /VPN/ {
            proxy_pass http://localhost:943;
        }
    }



    Guillem

    DISCLAIMER: :!: I'm not a native English speaker, I'm sorry if I don't explain as good as you would want. :!:


    My NAS:
    Always the latest OMV Erasmus running on an AMD Sempron 3850 @1.3GHz with 4.9.0 Backports Kernel
    with 120GB Samsung SSD 850 EVO for OpenMediaVault & 2x500GB Primary Data HDD + 1TB Secondary HDD for Backup & 2TB USB 3.0 External HDD for offline backup


    Plugin list:
    Flash Memory, Locate, OMV-Extras.org, RSnapshot, Sensors, Syncthing, SMB/CIFS, SSH, USB Backup
    _____________________________________________________________________________________________________________________________


    Zitat

    The Schrödinger's code is that one which is going to work and it's full of bugs at the same time; until you test it, you won't be able to determine it.

  • @gsola96


    Create this file:
    cd /etc/nginx/openmediavault-webgui.d/
    touch openmediavault-openvpnas.conf
    chown root:root openmediavault-openvpnas.conf
    chmod 644 openmediavault-openvpnas.conf


    Then put in these contents:

    Code
    location /VPN {
        return 301 https://$host:943/;
    }


    Then restart nginx.... a simple redirect is all you need. Access via https... you know it is secure.


    PS- Remember Chrome is not supporting java. You need to use IE.

  • Thanks Subzero and Tekk. So, from what I understand, this simple redirection could be implemented the same way to access Subsonic on port 2000 like this:

    Code
    location /subsonic {
        return 301 https://$host:2000/;
    }


    Am I right? Does that mean that I could access also the same way (using subdirectories) from a WAN outside my home LAN?


    EDIT: according to @subzero79, his guide is to be used with subdomains (sb.lan, whatever.lan) so, if I have a free domain gsola96.no-ip.org, if all the computers in the LAN have this domain (the entire gsola96.no-ip.org), could I then follow subzero's guide?



    Thanks for your attention. That's what makes OMV big!

    DISCLAIMER: :!: I'm not a native English speaker, I'm sorry if I don't explain as good as you would want. :!:


    My NAS:
    Always the latest OMV Erasmus running on an AMD Sempron 3850 @1.3GHz with 4.9.0 Backports Kernel
    with 120GB Samsung SSD 850 EVO for OpenMediaVault & 2x500GB Primary Data HDD + 1TB Secondary HDD for Backup & 2TB USB 3.0 External HDD for offline backup


    Plugin list:
    Flash Memory, Locate, OMV-Extras.org, RSnapshot, Sensors, Syncthing, SMB/CIFS, SSH, USB Backup
    _____________________________________________________________________________________________________________________________


    Zitat

    The Schrödinger's code is that one which is going to work and it's full of bugs at the same time; until you test it, you won't be able to determine it.

    2 Mal editiert, zuletzt von Lord Wektabyte ()

  • Redirects are good for when you are on your LAN, or when connected with a VPN connection. I thought you might not want to remember your ports numbers and have an easy name to remember. I don't think it is a good idea to open very many ports. I use OpenVPN to connect to my LAN and then I can use local addresses. Proxy passes are used to connect you to a domain and then pass you to subdomain (another site). You can use proxy passes but if they are not perfect parts of the website may not work correctly. You do not have to worry about all the hosting parameters with a redirect, especially if a service is self hosting and sets up it own web server.


    There are so many variables involved here and so much to learn. You cannot make a blanket statement on what is best.

  • Ok, now I have learned a bit more of all that stuff.


    I use OpenVPN to connect to my LAN and then I can use local addresses.


    By the way, I also use VPN to connect remotely because I'm also pretty paranoid about opening so much ports... At the moment I have only 4 ports of OMV opened to the world: the VPN, owncloud (to be able to connect from everywhere without needing the VPN), a public FTP site, and the 80 for my public wordpress side.
    Regarding that this last port is the 80 and opens the web interface to the world, are there any workaround to deny access to the root directory (in this case gsola96.no-ip.org) and only leave open the /wordpress/ subdirectory?


    Maybe this last question is Off-Topic but I would like the world not to be able to access the webGUI. Maybe changing the root directory to the wordpress site and leaving /whatever/ for the GUI... Don't know much about that :(

    DISCLAIMER: :!: I'm not a native English speaker, I'm sorry if I don't explain as good as you would want. :!:


    My NAS:
    Always the latest OMV Erasmus running on an AMD Sempron 3850 @1.3GHz with 4.9.0 Backports Kernel
    with 120GB Samsung SSD 850 EVO for OpenMediaVault & 2x500GB Primary Data HDD + 1TB Secondary HDD for Backup & 2TB USB 3.0 External HDD for offline backup


    Plugin list:
    Flash Memory, Locate, OMV-Extras.org, RSnapshot, Sensors, Syncthing, SMB/CIFS, SSH, USB Backup
    _____________________________________________________________________________________________________________________________


    Zitat

    The Schrödinger's code is that one which is going to work and it's full of bugs at the same time; until you test it, you won't be able to determine it.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!