Web application in a network environment

You just have to change the word localhost to the server's IP address (or DNS name if you have one setup), it's that simple. The term localhost is what a single server can, if needed, call just itself, a bit like the term 'me' in your inner monologue.