I got three webservers, two run apache one is running haproxy for load balancing
Now I need to upload photos in my cms, how can I make sure that certain URL will go into certain server? , I mean one server needs to be a master and second just a slave
Or there is another solution?
Also if people is using a form such as contact-us how can i make user this databases are the same ?
0
votes
1 Answers
1
votes
Try something like this (replace with your values as needed):
frontend www-http
mode http
bind :80
acl app hdr(Host) -i app.example.com
acl cms path_beg -i /cmspath
use_backend loadbalance if app
use_backend cms if app01 cms
backend loadbalance
balance roundrobin
option httpclose
option forwardfor
server apache1 xxx.xxx.xxx.xxx:80 check
server apache2 yyy.yyy.yyy.yyy:80 check
backend cms
balance roundrobin
option httpclose
option forwardfor
server apache1 xxx.xxx.xxx.xxx:80 check