Saturday, May 19, 2007

Fighting for freedom "Mission Reclaim my Port"

Being a geek, I do not want to fall in out of control situation while still standing on the cutting edge.
What you say running multiple web server on a single machine? Can I run multiple web server simultaneously? Yeah, why not? no big deal ... okay

But hey! Do I really need all web servers to run concurrently? for me I do not opt for that.
My ego is to load service as minimum as necessary to perform a certain task.

Anyway now look at what I got?
  1. IIS 5 - for ASP.NET development
  2. XAMPP - for PHP4 or 5 development + some other scripting
  3. Tomcat 5.5 - well since my favorite IDE(s) love it so much why can't I do it a favor?
Am I nut? why not configure all the development with single web server let say IIS.
Because I do not want to waste my time tracing out problem where it shouldn't occur... let children stay with their parents.

What the problem anyway?
Well simple, each web server will fighting for their seat "port(s)". IIS & XAMPP will try to take over ports 80, 443 etc where in case Tomcat 5.5.x is more polite by asking for a safe seat.

So what I do?
Okay, I pretend to be a traffic police officer by simply say ...
  1. IIS - listen at port 8080 (http) & 443 (https)
  2. XAMPP, Apache - listen port 80 (http) & 8443(https)
  3. Tomcat 5.5.x - this guy know that he always come last so he ask for higher port but I simply give it 8181 (http)
To spare my laptop batter non of these guy will ever load without my permission.
Even now it safe to load all web server simultaneously, I prefer not to do so.

I am a happy man?!
Yeah, I do until today I need to work on my PHP project suddenly XAMPP, Apache just ignore my command and complaint I giving it ports to another guy???? what the heck?
Anyway, checking Event log confirm that port is already in use. Who dare use the ports without asking me? by invoke portcheck tool ship with XAMPP I found that Skype 3.2.0.145 had take over port 80 and 443 aha...

Now it time to fight for freedom, I simple reclaim the ports back by disable listening port in the Skype: Tools > Options > Advanced > Connections...

Lucky that Skype only take these port as an alternative otherwise trouble.