How to access one server if they are connect with LoadBlancer?

If you are LAMP developer and your server is connected with LoadBlancer now LoadBlancer is big advantage in production to distribute traffic but sometimes it could be trouble for developer as you want to access one server out of two.

Now here is the analogy.
You have 2 servers and web1 and web2. Web1 is main and you are accessing through FTP and adding files then web2 is synced with web1 but while you are developing few files or code you want to access only web1 how to do that ?

Well this is simple, change host file and one config file!
I am using MAC so add these 2 lines in host file and you will be accessing only web1.

edit /etc/hosts
add the lines
00.56.983.249 www.phpmind.com
00.56.983.249 phpmind.com
at the bottom of the file
edit /etc/resolv.conf
add the line
order hosts, bind
to the top of the file

And you are done!

Share

2 thoughts on “How to access one server if they are connect with LoadBlancer?

  1. vikram

    i do assume this is for mac an linux …. in my thought on windows it will work editing etc/hosts file only. Correct if i am wrong.

Leave a Reply

Your email address will not be published. Required fields are marked *

*