Strange logout button

Nextcloud version (eg, 10.0.2): 10.0.4 (from EPEL for CentOS7)
Operating system and version (eg, Ubuntu 16.04): CentOS 7.4
Apache or nginx version (eg, Apache 2.4.25): nginx 1.10.2
PHP version (eg, 5.6): 5.4
Is this the first time you’ve seen this error?:
Can you reliably replicate it? (If so, please outline steps):

The issue you are facing:

Not sure how to describe the problem. I have nextcloud on home network, i also have server on the internet with public IP bounded to my home network with VPN. I’ve redirected requests on public server to nextcloud server using nginx:

location / {

And now i have access to nextcloud server from the internet. With one exception: the logout button. All (i think) other links points correctly to external server, except logout button, which points to, therefore prevents me from logging out. Does anyboy know why it is this way?

There’s some config you should do in Nextcloud’s config.php which might help (might not, I’m not sure). Refer to this documentation on setting that up:

I’ve put into /etc/config/php:

"overwritehost"     => "ssl-proxy.tld",

looks like this is enough (or at least good start point).