Nextcloud HAPROXY SSL
-
Re: Nextcloud and Haproxy Issues
Hi everyone;
I'm facing issues with nextcloud and haproxy SSL. My problem is every time that I login on nextcloud, I am redirected to the https port from my pfsense admin page. So, I erase the :port from URL, and I can access the web page from nextcloud. I've read about the nextcloud and reverse proxy, made the configuration, but the problem persists. I can't to know if there is a nextcloud route issue, or a haproxy issue.
-
What ports are you using for each of those things?
It sounds like NC is rediercting you to a port that HAProxy is not listening on but the pfSense GUI is.Steve
-
@stephenw10 Hello;
So, my pfsense are on 1881/tcp port, using https (with built-in certificate). My NC are running on 80/tcp port (default), but my Haproxy are listening on 443 port, using letsencrypt certificate by acme package. I have other services behind this haproxy, like zabbix, grafana and others, all of them are runing like a charm. My only problem is with nextcloud.
-
In System > Advanced try setting
Disable webConfigurator redirect rule
If that stops it hitting the pfSense webgui but it still fails to load then NC is probably redirecting to http somewhere.
Steve
-
@stephenw10 said in Nextcloud HAPROXY SSL:
In System > Advanced try setting
Disable webConfigurator redirect rule
If that stops it hitting the pfSense webgui but it still fails to load then NC is probably redirecting to http somewhere.
Steve
I doed it these adjusts, and have adapted this config. to my scenario https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html, so, for now, all is up and running.
Thanks a lot Steve!
Eder
-
@ederpaulopereira
In the NC config did you state the overwrite.cli.url value as http://...? Should be https://. -
@stephenw10 another situation: I have a nginx web server on my lan, and, again, I want to reverse proxy by haproxy. I've inserted the backend, frontend. Inside my Lan, using the local IP address, I can reach the webserver and see the web page. Using my haproxy, on https, SSL cert by letsencrypt + acme, DNS name, this is not possible (error 503). Another servers are normal access, but this nginx (virtualhost default) not. Any sugestion?
-
Could be a number of things. Is that error coming from the server or HAProxy?
-
@stephenw10 the error is in haproxy. I can reach the backend server directly by my lan network, and the nginx serves the index page. Out of my lan network, by the Internet, I get the error. I'll look for a solution, if you have any sugestion please post here.
-
I assume you get the same error if you try to connect via HAProxy from the local network?
Does HAProxy show the backend as up? What test do you have configured?
503 implies it's seeing it as unavailable.
Steve
-
@stephenw10
Steve, many thanks your attention.My mistake, the backend config. (Http check method) was changed from OPTION to GET, and was resolved.