XAMPP is a powerful application to setup server on your local machine for testing of your files before you host them to the server. Installation of XAMPP is pretty simple but it went tricky for me. It gave an error “Port 80 or 443 already in use.Apache2.2 service failed.” to me while installing Apache Tomcat and MySQL via XAMPP.

This error may encounter if you are already using port 80 which is done if you have already deployed a server (IIS probably) on your local machine. However, i had not installed IIS. And the reason was i have installed SKYPE on my machine which by default utilizes port 80. It’s a known issue that if Skype was installed before XAMPP it will occupy port 80 to communicate with your Internet connection.

Fix for this Problem:

Open up Skype and go to Tools and select Options. From the list that appears select Advanced and then Connection. There will probably be a check mark inside where it says “Use port 80 and 443 as alternatives for incoming connections” just unchecked that box and save your changes. Skype will still function normally and now XAMPP will be able to use port 80 to run.

Also if the problem is still not resolved, check hosts file in Windows directory. Hosts files are used by windows os to map their addresses.

Host file is located at: c:\windows\system32\drivers\etc\hosts

Your host file must look like this :

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# rhino.acme.com # source server
# x.acme.com # x client host

# localhost name resolution is handled within DNS itself. localhost
# ::1 localhost

If not make appropiate changes. (You may require admin privileges to make changes to this file.)

Now open up your browser and type this in your address bar:
http://localhost/ and press enter.

It will bring the “Welcome to the XAMPP index screen.”

Still not resolved or some other solution worked for you ? Let me know in comments…

2 thoughts on “XAMPP Installation Error: “Port 80 or 443 already in use.Apache2.2 service failed.””

  1. I’ve already done this but still i can’t use xampp… port 80 and 443 is still in use. What should I do.. In my desktop (office) Xampp and Skype function very well without changing the port! hope you’ll reply on my inquiry!

Leave a Reply

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