Kopano, Nextcloud behind Nginx proxy


#1

Hi,
I have UCS with Kopano . I have public domain domain.com and nginx reverse proxy.

Now I can set acces to this apps with this public domain name:
mail.domain.com --> 10.128.2.102/webapp

This works for public access https://mail.domain.com/webapp :

location /webapp {
proxy_pass https://10.128.2.102/webapp
.
.
}

I need https://mail.domain.com ( without /webapp at end)

location / {
proxy_pass https://10.128.2.102/webapp
.
.
}

But this not work. I get: The requested URL /webappwebapp/ was not found on this server.

Any help how to setup Nginx reverse proxy?

Thanks.


#2

does https://serverfault.com/a/562850/152358 help?


#3

Hi,
thank you.

I add trailing slash to proxy_pass https://10.128.2.102/webapp/;
Now, I have this situation:

  1. enter URL https://mail.domain.com to browser
  2. Login page is correctly loaded
  3. entrer username/pass
  4. URL in browser changed to https://mail.domain.com/webapp and show Not Found, The requested URL /webapp/webapp was not found on this server.
  5. I manualy delete /webapp from end of URL, then Kopano is correctly loaded and I can normaly work, every is working. URL in brovser stay https://mail.domain.com
  6. Click on Logout, URL again change to https://mail.domain.com/webapp and show Not Found, The requested URL /webapp/webapp was not found on this server

So little succses, but stlil bad…


#4

was worth a try. I’m wondering, since you also keep the /webapp alive the better way to deal with this is to simply redirect access from / to /webapp.

Something like that should work (not tested)

    location = / {
        return 302 https://mail.domain.com/webapp;
    }