How To Change XAMPP Apache Server Port

This quick tutorial help to Change XAMPP Apache Server Port.The default port of xampp Apache server is 80.Sometimes, Other application is using that 80 port.

So, When you will start XAMPP server, the xampp will through unexpected and notifies the server port is busy or running another application. e.g.- Skype is using 80 port to run application.

You can see all used ports from xampp. You can see that the which ports is already used by System.


I am going to change 80 to 8012 port to run xampp Apache web server.

How To Change Apache Port

You need to follow following steps to change xampp Apache port from 80 to 8012.

Apache HTTP server configuration file

Let’s open the "httpd.conf" file.You can open file from XAMPP config option.This file should be found in C:\xampp\apache\conf on Windows or in bin/apache for Linux :

Current configuration:

Listen 80
ServerName localhost:80

Replace them by:

Listen 8012
ServerName localhost:8012

SSL Apache HTTP server configuration file

The http-ssl.conf responsible to configure ssl setting for apache server.This file should be found in C:\xampp\apache\conf\extra on Windows and on Linux debian /etc/apache2/mods-available/ssl.conf.

The current Configuration –

Listen 443

ServerName localhost:443

Replace them by:

Listen 4431

ServerName localhost:4431

Save the file.

Restart the Apache Server.

Now access the localhost using http://localhost:8012, You can access localhost with out port by following steps –

  • Open Xampp Control Panel
  • Go to ConfigService and Port SettingsApache
  • Replace the Main Port and SSL Port values with our chosen port (e.g. 8012 and 4443).
  • Save Service settings
  • Save Configuration of Control Panel
  • Restart the Apache Server.


2 thoughts on “How To Change XAMPP Apache Server Port

  1. Thanks to you guys. this is far the most impressive solution for this error I have gotten on the web. all the YouTube videos I stumbled on trying to fix this error were a bunch of junk s**t.

Leave a Reply

Your email address will not be published.