Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Nextcloud and Haproxy Issues

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 3.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rybena
      last edited by

      Hi
      I am after some help please.
      I am trying to use Haproxy to connect to a nextcloud instance I have on a server on my lan, I followled this guide.
      https://blog.devita.co/pfsense-to-proxy-traffic-for-websites-using-pfsense/

      The issue I am having is that I can connect to my Nextcloud instance on a web page, but not about to using the android app or the Linux client on Ubuntu, I get errors saying they cannot connect.
      The android client says "Access Forbidden, Invalid request"
      The Linus client say "Internal Server Error".

      Please let me know what logs to post as I am unsure where to look and also if I should give anymore information.

      Thanks very much.

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by stephenw10

        Check the firewall logs for blocked traffic from those devices when you try to connect. I assume you are connecting from the WAN side?
        Are you using standard ports? 80+443?

        Are you able to connect from those clients if you are inside the firewall connecting directly without using the proxy?

        Steve

        1 Reply Last reply Reply Quote 0
        • R
          rybena
          last edited by

          Thanks for the reply.
          Yes I'm using 80 and 443.
          I can connect no problem within the LAN using the local ip address skipping the proxy.
          Couldn't see anything wrong in the firewall logs my attempts let me through and doesn't deny any attempts by me.
          I have a feeling it has something to do with forwarding the headers from the Nextcloud instance but I'm not sure and not sure how to forward them or if that's even the issue.

          P 1 Reply Last reply Reply Quote 0
          • P
            PiBa @rybena
            last edited by

            @rybena
            Have you checked these settings?: https://docs.nextcloud.com/server/15/admin_manual/configuration_server/reverse_proxy_configuration.html

            Do the haproxy logs show that these carddav / caldav pages are requested by the client?

            R 1 Reply Last reply Reply Quote 0
            • R
              rybena @PiBa
              last edited by

              @PiBa
              I had already added a trusted proxy to the nexcloud config.
              I'm not sure how to set the redirects for the CalDAV, CardDav in Haproxy as is suggested in the link you posted. I will do some research and see how to do this.

              1 Reply Last reply Reply Quote 0
              • R
                rybena
                last edited by

                WooHoo!!!

                I have got it to work!!

                I added to the Nextcloud config.php file

                'overwriteprotocol' => 'https',

                I think it has something to do with HAProxy handling ssl.

                Anyway its SOLVED!

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.