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

    HAproxy unable to login on wordpress/wp-admin page

    Scheduled Pinned Locked Moved Cache/Proxy
    8 Posts 5 Posters 2.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.
    • D
      darkalien
      last edited by

      hi all

      fairly/very new on proxy enviroment, so incase im overlooking something silly my apologies,

      i have a PFsence as modem/router wich has the HAproxy packages installed.
      made the rules for 80 and 443 on wanside.
      installed ACME with cloudflare dns challange,
      configured HAproxy for 3 backends,
      1 backend being a wordpress website,
      1 backend being a Synology nas
      1 backend being HASSIO
      when i set all of that up it all seemed to be working.
      then i tried to login my wordpress website on a external location,
      all the pages load without a problem, untill i try to login that is...
      for some reason when i go to domain.nl/wp-admin and type in my username and password, hit enter, it seems like it just refreshes the page?
      no unknown/bad username notification, no login notification, no nothing....

      when i hit show configuration i get > https://paste.ubuntu.com/p/syhtzBdFJd/
      did alter my ip and some domain or subdomain names,

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

        @darkalien
        Youve got 1 frontend that listens on both :80 and :443, thats okay.. BUT does not mean that if traffic is directed to 1 backend that it will then use the server with the same port..
        So your wordpress backend has 2 servers, and will 'loadbalance' traffic over both.. Meaning a single client-browser will sometimes connect to 192.168.1.135:80 and sometimes to 192.168.1.135:443. I doubt that that is what you intended..? This could be changed by specifying some acl in the backend and use_server action so that https traffic will always hit the :443 server and non-https will go to :80 .. but much clearer would be to make 2 backends out of that configuration, or redirect all :80 traffic to https perhaps on the frontend side already.?.

        Also i wonder, have you configured WordPress 'properly' to function behind a reverse-proxy.? https://www.digitalocean.com/community/tutorials/how-to-use-haproxy-as-a-layer-7-load-balancer-for-wordpress-and-nginx-on-ubuntu-14-04

        T 2 Replies Last reply Reply Quote 0
        • D
          darkalien
          last edited by

          @PiBa

          thankyou for your answer, though i found the issue..
          in wordpress config file i had change the base url and i forgot a / at the end.....

          1 Reply Last reply Reply Quote 0
          • T
            Tarilok @PiBa
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • T
              Tarilok @PiBa
              last edited by johnpoz

              @piba Awesome! Thanks for posting your solution. I have been asking this question for a long time and can't find an answer.
              By the way, I want to now build a website with WordPress and add some plugins that I found on <link deleted by mod> that will simplify tons of complicated tasks.. I've never created a WordPress website before, so I don't really know where to start. I'm new to this so I will appreciate receiving any suggestions and advice from you. Thanks in advance!

              kiokomanK 1 Reply Last reply Reply Quote 0
              • kiokomanK
                kiokoman LAYER 8 @Tarilok
                last edited by

                @tarilok
                smart, is this spam? first post and you put a link to some random website? is Akismet on holidays 😁 ? that has nothing to do with pfSense anyway, why do you think this is the right place to ask for WordPress stuff?

                ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                Please do not use chat/PM to ask for help
                we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                johnpozJ D 2 Replies Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @kiokoman
                  last edited by johnpoz

                  If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck... ;)

                  spammy link removed.. Should prob just delete and ban.. But lets see.. benefit of the doubt.

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • D
                    darkalien @kiokoman
                    last edited by darkalien

                    @johnpoz
                    u sure its a duck? id start with dna profiling and disecting it

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