NGINX Reverse proxy + vitual hosts

  • Hi!
    I'm going to set up my Nextcloud and thinking if I should set up nginx with the plugin or the normal way (manual creating conf files).


    I'm not sure, if it will work setting up a reverse proxy just with the plugin. Does anybody tried it? My intention would be by just using the WebGui and not ssh setting it up.
    Or am I the first one trying?

  • Currently omv-nginx dosen't support reverse proxy
    So you have to edit manually
    I wrote guide for reverse proxy for omv

    OMV3 on Proxmox
    Intel E3-1245 v5 | 32GB ECC RAM | 4x3TB RAID10 HDD
    omv-zfs | omv-nginx | omv-letsencrypt | omv-openvpn
    Click link for more details

    Einmal editiert, zuletzt von luxflow ()

  • I give you wrong information
    omv-nginx support reverse proxy
    it is very simple and easy
    just install omv-nginx and


    set Name-based -> set server name whatever you want


    putting Extra options


    location ^~ / {
    proxy_pass http://localhost:<next cloud port>;
    proxy_http_version 1.1;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_read_timeout 1d;
    }

    OMV3 on Proxmox
    Intel E3-1245 v5 | 32GB ECC RAM | 4x3TB RAID10 HDD
    omv-zfs | omv-nginx | omv-letsencrypt | omv-openvpn
    Click link for more details

  • Where can I set Name-based Servername ?
    Where to put the Extra options?
    Did not find any settings in OVM webgui for nginx.
    Do I have to edit the nginx.conf?


    Regards
    Erich

  • Where can I set Name-based Servername ?Where to put the Extra options?
    Did not find any settings in OVM webgui for nginx.
    Do I have to edit the nginx.conf?


    Regards
    Erich

    Quick solution to your question - note that you don't need the nginx plugin for this!


    Using Nextcloud as an example:
    Create /etc/nginx/openmediavault-webgui.d/nextcloud.conf with the content below. Make changes to the file name, nextcloud and http://localhost:port/ to suit your needs. This example would allow you to access Nextcloud via https://yourdomain/nextcloud.

    Code
    location ^~ /nextcloud/ {
       proxy_pass http://localhost:port/;
       proxy_set_header Host $host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header HTTP_X-Forwarded-For $proxy_add_x_forwarded_for;
    }
  • I'm trying to set up a reverse proxy so that subdomain.mydomain.com is redirected to another computer on my internal network.


    I have a router that directs external requests on port 80 and 443 to my OMV/Nextcloud server. This works fine.


    I have subdomain.mydomain.com set up correctly in the DNS. Browsing to it currently connect to my OMV/nextcloud server.


    I am trying to configure a file in nginx that will achieve the reverse proxy.


    I have tried adding the following code both to the end of the openmediavault-webgui file in /etc/nginx/sites-enabled/ and also to a separate file in the same directory.



    On both occasions nginx -t shows no errors, and I reload with nginx -s reload. When I browse to subdomain.mydomain.com I get the OMV login page.


    I have tried the Add Server option via the nginx service page on the OMV webgui... but that causes an error when I try to apply the changes.


    I can see that the nginx OMV page has added the following to the bottom of the zzz-omv-nginx file:


    That causes nginx to fail because it's trying to access port 80 twice. Removing either (or both) of the listen commands doesn't work. I have to remove that code and sudo fuser -k 80/tcp to get nginx running again.


    So - the nginx plugin doesn't add reverse proxy sites correctly... and I can't work out how to do it manually...


    Any tips?


    - Andrew

  • Is this still alive?


    Looking for help to achieve reverses proxy:


    i actually can reach my OMV nas with nas.domain.local and nextcloud.domain.local.


    What i'm looking to do is reaching my nextcloud (wich is indeed hosted on OMV on https port 8095) with this url: https://nextcloud.domain.local
    AS far as i understand, i need to route this FQDN to localhost:8095 (HTTPS)


    but i dont get how to achieve this.


    Thoses URL's actually works: https://nas.domain.local:8095 and nextcloud.domain.local:8095


    Would be great if someone could point me all the right settigns to setup in nginx plugin!


    Thanks for your help ! :)

Jetzt mitmachen!

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