HAproxy unable to login on wordpress/wp-admin page
-
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, -
@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
-
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..... -
This post is deleted! -
@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! -
@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? -
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.
-
@johnpoz
u sure its a duck? id start with dna profiling and disecting it