- Forums
- Tutorial and Guides
- XAMPP Change Default Localhost HTTP Port Number
This is a simple and very easy way to change the default port 80 for your localhost http server when using XAMPP versions. Helpful when you want to run multiple servers at the same time for test and development. [4789], Last Updated: Mon Jun 24, 2024
webune
Sat Apr 04, 2020
0 Comments
1683 Visits
This is the method on how to change the default XAMPP localhost:80 port number, follow these simple steps:
- Open the XAMPP control panel
- Stop all running services
- Click on the Config button
- In the Configuration panel, click on the 'Service and Port Settings' button
- In the Service Settings panel under Apache, change the "Main Port' number to whatever you like. In our example in the image above, we selected port 8007 and port 8443 for SSL
- Click on Save
- Click on Save
- Ensure you are NOT running Apacher. In the main XAMPP control panel, under the actions section, select Apache>Config>Apache(httpd.conf)
- In the httpd.conf file, search for "Listen 80" and change it to "Listen 8007" and save the changes and close the file.
- In the XAMPP main control panel, under the actions section, select Apache>Config>Apache(httpd-ssl.conf)
- In the httpd-ssl.conf file, search for "Listen 443" and change it to "Listen 8443" and save the changes and close the file.
- In the XAMPP control panel, start the Apache module.
- Start your Apache server
- Open URL in your browser: http://localhost:8443/dashboard/ or http://localhost:8007/dashboard/
XAMPP is a very useful package for developing PHP applications in your local machine like your laptop for example. During our development, we needed to upgrade a customer's script from PHP 5 to PHP 7, we needed to test simultaneously, with XAMPP, you can run two services with different ports.
That is all, enjoy