Skype and XAMPP Apache Port 80 and 443 Fail and Fix!

SKYPE_vs_XAMPP
Who will rise?

So apparently Skype and XAMPP’s apache server uses the same ports on a computer and that causes XAMPP to not be able to setup its Apache server while Skype is running, of course I could just close Skype, but come on.. I don’t initially work-around like that, and there was an easy way to fix it.

I got this error,

23:03:23 [Apache] Error: Apache shutdown unexpectedly.
23:03:23 [Apache] This may be due to a blocked port, missing dependencies,
23:03:23 [Apache] improper privileges, a crash, or a shutdown by another method.
23:03:23 [Apache] Check the "/xampp/apache/logs/error.log" file
23:03:23 [Apache] and the Windows Event Viewer for more clues

So I started investigating the port thing, and I set out to try changing the ports on XAMPP!

Changing the Apache ports 80 and 443 in XAMPP

I don’t know if this is a problem with the portable version, but when I tried going to the XAMPP Control Panel, press Config in the top right corner, choose Service and Port Settings, for some reason it wouldn’t save my settings, which only made me even more grrrr because if the save button doesn’t save why is it even there?! So, on to da google mobile.

Find out where XAMPP gets its port settings from and change this, and as it turns out, you’re able to find the interesting files from the Control Panel, if you press Config, to the right of the Apache module (red arrow in the picture below), you will notice a dropdown menu.

Skype_Xampp_Apache_Port_fail_1

Here you can select either of the options, the ones that says <Browse> will open the containing folder, and the ones in the top will open the files.

Firstly: choose the option Apache (httpd.conf), number 1 in the picture above, and the file httpd.conf opens. You will want to change the lines

Listen 80 to Listen 81
ServerName localhost:80 to ServerName localhost:81

… You really just change everything that says 80 to 81. Of course it is pretty essential your computer is not running anything else on port 81, else this won’t work either.

Secondly: choose the option Apache (httpd-ssl.conf), number 2 in the picture above, and the file httpd-ssl.conf opens. You will want to change the lines

Listen 443 to Listen 442
<VirtualHost _default_:443> to <VirtualHost _default_:442> 
ServerName localhost:443 to ServerName localhost:442

… You really just change everything that says 443 to 442. Again it is pretty essential your computer is not running anything else on port 442, else this won’t work either.

Of course I would recommend you restart your computer, monitor, dog and finally call your neighbor and have him restart his system too, because restarting stuff makes it run better, but really you can just start the Apache module right away to test it.

And now finally, you might be tempted to try the usual localhost:80 to get the index of XAMPP in your browser, but that wont work anymore, now it’s localhost:81, you just changed the port!

But as I just Google’d it again, I found out something even more disturbing, Skype is actually listening for incoming calls on port 80 and 443 and its a feature you can easily disable.

Disabling the port 80 and 443 for Skype

As it is written and explained on this wonderful blogpost, http://www.mydigitallife.info/disable-skype-from-using-opening-and-listening-on-port-80-and-443-on-local-computer/ !

To turn off and disable Skype usage of and listening on port 80 and port 443, open the Skype window, then click on Tools menu and select Options. Click on Advanced tab, and go to Connection sub-tab. Untick or uncheck the check box for Use port 80 and 443 as an alternatives for incoming connections option. Click on Save button and then restart Skype to make the change effective.

The post also writes,

Skype uses port 80 and 443 to allow Skype behind firewall to connect to peer or accept incoming connection from peers through NAT which otherwise won’t be able to connect through the blocking or restrictive firewall that doesn’t permit any other ports to be opened.

But also writes,

“… leaving the ports 80 and 443 open and listening also has security risk where the port can be scanned by malicious virus or hacker to launch attack or infection.

Personally I just changed the ports on the Apache Server in XAMPP, because I didn’t know about simply disabling Skype from using these ports at the time of fixing. Now knowing about Skype, well, I use Skype a lot, and it’s already so full of problems that I won’t decrease its usability any further on purpose, but if it works without it, it’s not needed, so for now I’m gonna disable Skype from using these ports as well. I’ll check back with how it ruined everything later!

So in conclusion, neither won the rights to the glorious gates of 80 and 443 this time!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.