What happens if you install 2 servers on one machine eg: pws and apache - which one is localhost?

Localhost is just an entry in your hosts config file that points it to your local ip (127.0.0.1?), so what ever machine you have set up to look at the port your using (80 http for you?) then it will be that one. If you have multiple servers listening on same port it might be a problem....

Like Atlex said, localhost is just a reference to your IP. You can enter HTTP://localhost, FTP://localhost, localhost:80, Localhost:25, localhost:1337, whatever you'd like and it will go to the intended service through the described port.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.