How to Change the XAMPP Server Port on Windows

Updated:

by

How To Change The XAMPP Server Port In Windows

Has the port 80 already been assigned to some other application on Windows and your Apache module is not being started on XAMPP and showing the error, “Error: Apache shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method“? You’re in the right place.

In this tutorial, I will guide you step-by-step on how to change the XAMPP server port on Windows and fix the port error.

Below you can see the port error on XAMPP Control Panel. The localhost’s default port is 80. It can only be used by one application. When it is used by some other installed application like IIS, WampServer, MAMP, or Skype, can’t be used for XAMPP.

Error: Apache shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method

How to Change the XAMPP Server Port

Follow the steps to change the XAMPP Server port on Windows.

  • Open XAMPP Control Panel.
  • Click on the Config button of Apache Module.
  • Click on the Apache (httpd.conf) option.
Open XAMPP Control Panel. Click on the Config button of Apache Module. Click on the Apache (httpd.conf) option.
  • Press Ctrl + F to open the Search on Notepad. Find Listen 80 and replace 80 with 8080 like this: Listen 8080.    
Find  Listen 80 and replace 80 with 8080 like this: Listen 8080
  • Find ServerName localhost:80 and replace it with ServerName localhost:8080.
  • Save the file.
Find ServerName localhost:80 and replace it with ServerName localhost:8080.
  • Click on the Config button of Apache Module again.
  • Click on the Apache (httpd-ssl.conf) option.
Click on the Config button of Apache Module again. Click on the Apache (httpd-ssl.conf) option.
  • Press Ctrl + F to find Listen 443 and replace 443 with 4433 like this: Listen 4433.
Press Ctrl + F to find Listen 443 and replace 443 with 4433 like this: Listen 4433.
Find <VirtualHost _default_:443> and replace it with <VirtualHost _default_:4443>. 
  • Save the file.
Find <VirtualHost _default_:443> and replace it with <VirtualHost _default_:4443>
  • Click on the Config button of Control Panel to open the Configuration of Control Panel.
Click on the Config button of Control Panel.
  • Click on the Service and Port Settings button.
Click on the Service and Port Settings button.
  • In the Main Port field, type 8080.
  • In the SSL Port field, type 4433.
  • Click on the Save button.
In the Main Port field, type 8080. In the SSL Port field, type 4433. Click on the Save button.
  • Now Start the Apache Module from XAMPP cPanel.
  • To open the XAMPP localhost type this URL: http://localhost:8080/.
  • To open your project, add the folder name like this: http://localhost:8080/Your_Project_Name.
Now Start the Apache Module from XAMPP cPanel.

If you like this post then don’t forget to share with other people. Share your feedback in the comments section below.

Also Read

Related Topics: , , , ,
Buy Domain and Hosting on Namecheap Now
Find a Freelancer for website design, logo design, graphic designing, WordPress, Blogger, NFT, AI, SEO, Digital Marketing, Amazon Seller Services, Voice Over, Script Writing, Data Entry, Translations, and many more...
Download Website Themes
Mangools SEO Tools
Order Motivational T-Shirts With Quotes from Our Store Fire Ram 23.4.

Subscribe to Our Newsletter!

Leave a Reply

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