NGINX Reverse proxy + vitual hosts

    • OMV 3.x
    • 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?
    • 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 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
    • luxflow wrote:

      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 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;
      }
      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
    • erichabg wrote:

      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 yourdomain/nextcloud.

      Source Code

      1. location ^~ /nextcloud/ {
      2. proxy_pass http://localhost:port/;
      3. proxy_set_header Host $host;
      4. proxy_set_header X-Real-IP $remote_addr;
      5. proxy_set_header HTTP_X-Forwarded-For $proxy_add_x_forwarded_for;
      6. }