[tricks] URL beauty for shellinabox and deluge

    • OMV 1.0

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [tricks] URL beauty for shellinabox and deluge

      Hello Guys and women

      I don't like url with port like : 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

      Source Code

      1. location /shellinabox {
      2. return 301 https://$host:4200/;
      3. }


      replace with :

      Source Code

      1. location /shellinabox {
      2. proxy_pass https://$host:4200;
      3. }


      # service nginx restart

      and now you can use shellinabox at YOURIP/shellinabox


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

      write this :

      Source Code

      1. location /deluge {
      2. # Source http://tensixtyone.com/post/deluge-web-interface-and-ngnix
      3. proxy_pass http://127.0.0.1:8112/;
      4. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
      5. proxy_redirect off;
      6. proxy_buffering off;
      7. proxy_set_header Host $host;
      8. proxy_set_header X-Real-IP $remote_addr;
      9. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      10. proxy_set_header X-Deluge-Base "/deluge";
      11. }
      Display All


      # service nginx restart

      and now you can use deluge at YOURIP/deluge

      enjoy it
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban

      The post was edited 1 time, last by pr_bond ().

    • 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:

      Source Code

      1. https://ipofyouromv/shellinabox
      2. or
      3. ipofyouromv/shellinabox

      The post was edited 2 times, last by tekkb ().

    • 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 !!! :thumbsup:
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban
    • We could add a proxy_pass option to the plugin. I think it actually used to have it.
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • 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 v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 6 times, last by 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.

      Source Code

      1. server {
      2. listen [::]:80 ipv6only=off;
      3. listen [::]:5443 ssl ipv6only=off;
      4. server_name xyz.mydomain.com;
      5. if ($scheme = http) {
      6. return 301 https://$server_name:5443$request_uri;
      7. }


      3. Restart the Nginx service.

      4. Done.


      OMV v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 21 times, last by tinh_x7 ().