Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Issue with reverse-proxying nextcloud

Featured Replies

Hi!

 

Not really sure where to post this issue I'm having. 

 

I'm trying to reverse-proxy my (linuxserver.io) Nextcloud container using Nginx Proxy Manager but it doesn't work. 

 

The Nextcloud docker is running on port 443 only (I'm not managing to just have it on port 80 through the conf-file), which messes with Nginx Proxy Manager since that wants to handle the redirect as I understand it. Any ideas? I've tried adding another Host port 80 in the docker settings in Unraid and adding:

 

server {
    listen 80;
    listen [::]:80;
    server_name storage.*;
    return 301 https://$host$request_uri;
}

to the nextcloud dockers Nginx/site-confs/default, but no luck.

 

I'm running Authelia infront of the address as a (at least perceived) layer of security, if that helps, but Authelia works as it should.

 

Have I forgotten any information that might be necessary to assist?

 

EDIT: Running all dockers with own its on br0-network.

 

//Muppie

 

 

 

 

hardhome-diagnostics-20200801-0709.zip

Edited by muppie

This is working for me:

 

### nextcloud
server {
        listen 443 ssl;
        server_name nextcloud.domainname.com;
        client_max_body_size 20G;
	add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";

        location / {
              proxy_pass https://10.1.1.20:4430;
              proxy_max_temp_file_size 2048M;
	      proxy_buffering off;
              proxy_read_timeout 256;
        }

    location = /.well-known/carddav {
      return 301 $scheme://$host:$server_port/remote.php/dav;
    }
    location = /.well-known/caldav {
      return 301 $scheme://$host:$server_port/remote.php/dav;
    }

   }

 

  • Author

Thanks!

 

Just a follow-up, the ip (10.1.1.20), is that something I need to change to match an ip on my network?

  • Author

I must have read the support thread a hundred times a day but I now found this solution: Now I just need to try it.

 

On 12/21/2018 at 7:14 PM, Djoss said:

@amacdonald, currently, Nginx Proxy Manager doesn't have the support for forwarding to a HTTPs backend/server.

 

In the meantime, if you really want to have your nexcloud forwarding working, you can manually edit the generated Nginx config to make your proxy works:

In /mnt/user/appdata/NginxProxyManager/nginx/proxy_host/, find the file associated to nextcloud. You then need replace the directive "include conf.d/include/proxy.conf" with:


add_header       X-Served-By $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto  $scheme;
proxy_set_header X-Forwarded-For    $remote_addr;
proxy_pass       https://$server:$port;

Finally, restart the container.

Note: if you do a change from the UI, the config file will be overwritten and you will loose your changes!

1 hour ago, muppie said:

Thanks!

 

Just a follow-up, the ip (10.1.1.20), is that something I need to change to match an ip on my network?

Yes. It’s the ip of your Nextcloud host. 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.