[tricks] URL beauty for shellinabox and deluge

  • Hello Guys and women


    I don't like url with port like : http://127.0.0.1:4200


    I have tricks for you and only for shellinabox and deluge


    shellinabox
    edit the file : /etc/nginx/openmediavault-webgui.d/openmediavault-shellinabox.conf


    Code
    location /shellinabox {
    return 301 https://$host:4200/;
    }


    replace with :

    Code
    location /shellinabox {
    proxy_pass https://$host:4200; 
    }


    # service nginx restart


    and now you can use shellinabox at http://YOURIP/shellinabox



    deluge
    create the file : /etc/nginx/openmediavault-webgui.d/openmediavault-deluge.conf


    write this :



    # service nginx restart


    and now you can use deluge at http://YOURIP/deluge


    enjoy it

  • I have better trick for shellinabox if you want to change port. Just adjust the mkconf file here /usr/share/openmediavault/mkconf/shellinabox
    There are 2 places where it says 4200. Just change it to the port you want. Then disable/enable and refresh browser.


    Is it just because you don't like the 4200 to show in the address line of the browser??? Because this will already pull it up with the redirect:


    Code
    https://ipofyouromv/shellinabox
    or
    ipofyouromv/shellinabox
  • I don't want change port, i don't want port in url, thanks for your trick


    From my work this port (4200) and many other are blocked .... :(
    It's so pretty without port number in url !!! :thumbup:

    • Offizieller Beitrag

    We could add a proxy_pass option to the plugin. I think it actually used to have it.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • It was using nginx for ssl before. Then it had it's own ssl. So double encrypted when using ssl on the web gui. I changed it to redirect because it has it's own web server.

  • Code
    location /shellinabox {
    proxy_pass https://$host:4200; 
    }



    Will this reverse proxy work for OwnCloud ?
    My ISP blocked port 443, so I have to use an alternative port.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    2 Mal editiert, zuletzt von tinh_x7 ()

  • The shellinabox website is pretty basic so it might work fine. But with ownCloud I don't think it will work and you'll need more parameters. I think it would be easier to change the port in the server config that ownCloud listens on for ssl.


    I tell people this too but no one listens. Leave your service on the standard port. Open non-standard port on your router and port forward to the 443 on your OMV machine on your LAN. Then you don't have to mess with anything on OMV.

  • I already have non-standard port port forward to OwnCloud.
    The problem is that I don't want to type the port number into the URL in order to access it.
    I"m thinking proxy pass may work.


    So if I leave OMV of http as 80, and https as 443, then I need to create a nonstandard port for OC.
    How is that going to work for OC?


    This is my router current setting:


    Owncloud:


    HTTP:
    Port Range (UDP): 80-80


    HTTPS
    Port Range (TCP): 5443-5443


    ===========================
    OMV:


    HTTP:
    8080-8080


    HTTPS:
    4443-4443

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    6 Mal editiert, zuletzt von tinh_x7 ()

  • I know what you're talking about, but unfortunately my ISP modem/router doesn't have that option.
    It has just port range. The ISP router has already using port 443.


    After two days of research & trial & errors, I finally found a solution.
    For those users who struggle for HTTP to HTTPS redirection of ownCloud like me, below is the solution.


    1. In Nginx service's settings: enable SSL, leave HTTP enable on port 80, enable SSL port as default, and leave the rest default.



    2. Edit the /etc/nginx/sites-enabled/openmediavault-nginx appropriately.

    Code
    server {
        listen [::]:80 ipv6only=off;
        listen [::]:5443 ssl ipv6only=off;
        server_name xyz.mydomain.com;
        if ($scheme = http) {
            return 301 https://$server_name:5443$request_uri;
    }


    3. Restart the Nginx service.


    4. Done.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    21 Mal editiert, zuletzt von tinh_x7 ()

Jetzt mitmachen!

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