0

I've found several posts on this site and other stack sites and among others and Binging and Googling, however, none of them really seem to work for me.

Little bit about what I do: I build websites. I use WordPress for my websites. I have three different subdomains for my websites: dev.domain.com (Development), beta.domain.com (Beta), and www.domain.com (Live).

I'm looking to simply just match by subdomain:

  • www -> server_pool_1
  • beta -> server_pool_2
  • dev -> server_pool_3

but then for each of those...

I want to force the administration panel (*.domain.com/wp-admin/ and *.domain.com/wp-login.php) to go to server_pool_4 only (whether it's dev, beta, or www, they all need to go to server_pool_4).

I want the WordPress administration panel to have it's own dedicated server pool.

Any pointers or possibly some examples?

edit1 Looking to match www.domain.com and domain.com as the same.

edit2 I did some more research and trial and error. I made an answer which does what I need it to do.

This also doesn't address things like ... Sessions/cookies/SSL. How would I do things like that as well?

  • 2
    I am just confused about the problem, are those rules working for you in terms of redirecting request to correct backend. The sessions you are talking about is it sticky sessions ? what are the problems you are facing regarding cookies. And finally SSL , If you are using haproxy version 1.5 or above you can configure ssl very well, so what exactly you want from us ? – Gaurav Pundir Mar 7 '16 at 6:19
  • It appears that my rules are working fine now. I need SSL websites to work too. What do I need to do to get SSL websites working too? Something weird is going on with files. Load balancer picks a server to load the site from (and this works fine) but then all the CSS and JS is loading from what ever DNS has cached. So it's loading those files from a different server. How can I get the files to load from the same server which load balancer selected? Perhaps a new question for each of these? Or could they be answered here? – Michael Ecklund Mar 7 '16 at 20:56
  • Well to implement ssl, you have to define a ssl certs and further configuration related to ssl in your frontend, which you can easily find out on google, or you can refer to this like. About your CSS and JS, there should not be a problem if you have defined relative links in your html pages. Let us know what link is created for the css on the browser through inspect element functionality in the browser. – Gaurav Pundir Mar 8 '16 at 6:01

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.