By changing the configuration files of each server, you have have them listening on different ports. This way they will not conflict with each other returning a Port in Use error. However, I do agree with Journeyman Geek as running multiple VMs is ideal in my opinion. You could use something like VirtualBox's Export/Import Appliance feature that will allow you to quickly get the other two VMs copied and running. Much easier in separating the three servers in troubleshooting. Only reason why I can see you wanting to have different servers for different ports is if you were making an administrative backend to an application, but then why not just use Virtual Hosts.
APACHE
Usually in your /etc/apache2/ports.conf there is a line that tells apache which port to listen on. You will want to change this to your applicable port.
Listen 80
NGINX
When you setup this server, you'll have a configuration similar to this one where you're listening on port 81.
server {
listen 81;
server_name localhost;
access_log logs/localhost.access.log main;
location / {
root html;
index index.html index.htm;
}
}
LIGHTTPD
server.port = 82
hmm. that maybe the case.. but i am thinking that if my apache server is accessed through 127.0.0.1 then i could change the other 2 web servers,, it would be now 127.0.0.1:8000 and 127.0.0.1:6969. but i dont know how to do this. can you elaborate more? – RedKing – 2012-01-08T12:55:18.007
just add the well, thats how you do it, precisely. I haven't set up a proxy before, so i'm not sure of the details. For running on seperate ports, install, it won't start, so just go into the config, change it, and then start the process – Journeyman Geek – 2012-01-08T12:59:04.387
2Ewww - you don't need to install 3 separate VMs to use a separate IP on each web server! The IP address used by the web server will be specified in the configuration file, such as by the Apache Listen directive. – MikeyB – 2012-01-08T14:17:40.550
well, he'd need three interfaces wouldn't he? I suppose the best setup depends on how he wants to use it. – Journeyman Geek – 2012-01-08T14:38:09.660