Cannot connect Windows-client to Nextcloud behind HAProxy

I just installed a Nextcloud service on a GNU / Linux Debian 10 system.
It works correctly on port 80.
To remedy infrastructure problems, this nextcloud service acts on the back-end of a HAProxy front-end. This front end is accessible with an HTTPS connection.

When I invoke the public URL from a web browser, everything works fine. I access the interface, I can drop files, consult an agenda …

As soon as I install the Windows client, it asks me for my personnal URL, opens a browser and waits for my identification. I enter my login, my password, and then, nothing happens.

I went to watch the LOGs on the web server and I can see this line:
“POST /index.php/login/v2/poll HTTP / 1.1” 404 685 “-” "Mozilla / 5.0 (Windows) mirall / 2.6.2stable -Win64 (build 20191224) (Nextcloud) "

A page not found ?
What can be wrong ?

I tried to access API v2 by following these recommendations:
Not better…

Thank you for your clarification and your attention.

1 Like

Have same error.

Do you use OPNSense or PfSense as a HAProxy front-end service ?

I used container behind Nginx-companion with let’s encrypt certs.
Basic config.php will try to work over http, but Nginx companion proxy wait for https connection and won’t send token approve.

I solve it adding this in config.php

‘overwrite.cli.url’ => ‘’,
‘overwriteprotocol’ => ‘https’,
‘overwritehost’ => 'files.

Thank you!

The last two lines of the configuration fixed my problem.

I use Rancher with HAProxy and had the same connection problems with WIN and Linux Clients.