Php

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:

Related Post
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.

View Comments

  • thank u so mch, after wandering through all over the internet, this article saved my life

  • 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.

Recent Posts

Configure and Retrieve S3 Information Using Laravel PHP-AWS-SDK

This tutorial helps integrate a PHP SDK with Laravel. We'll install aws-php-sdk into laravel application and access all aws services… Read More

4 months ago

What is the Purpose of php_eol in PHP?

in this quick PHP tutorial, We'll discuss php_eol with examples. PHP_EOL is a predefined constant in PHP and represents an… Read More

10 months ago

Laravel Table Relationship Methods With Example

This Laravel tutorial helps to understand table Relationships using Elequonte ORM. We'll explore laravel table Relationships usage and best practices… Read More

10 months ago

Exploring the Power of Laravel Eloquent Join?

We'll explore different join methods of Laravel eloquent with examples. The join helps to fetch the data from multiple database… Read More

10 months ago

Quick and Easy Installation of Laravel Valet

in this Laravel tutorial, We'll explore valet, which is a development environment for macOS minimalists. It's a lightweight Laravel development… Read More

11 months ago

What is Laravel Soft Delete and How Does it Work?

I'll go through how to use soft delete in Laravel 10 in this post. The soft deletes are a method… Read More

11 months ago

Categories