A step-by-step guide on how to modify the default port of Xampp Server (Apache) to any free port.

0

 This is a step-by-step guide on how to modify the default port of Xampp Server (Apache) to any free port.



The first thing that comes to mind when discussing localhost is Xampp. With the help of this software, Apache and MySQL are now accessible to all computer-based developers. Many issues arise while performing these Localhost tasks. The fact that "Apache default port 80 doesn't function!" is one of the issues. This issue comes as a result of some other function using up port 80. You therefore require another. It becomes required to change the default ports for that.

If it show you a message like this, then this tutorial is perfectly suited for you.

9:58:13 AM [Apache] Status change detected: stopped
9:58:13 AM [Apache] Error: Apache shutdown unexpectedly.
9:58:13 AM [Apache] This may be due to a blocked port, missing dependencies,
9:58:13 AM [Apache] improper privileges, a crash, or a shutdown by another method.
9:58:13 AM [Apache] Press the Logs button to view error logs and check
9:58:13 AM [Apache] the Windows Event Viewer for more clues
9:58:13 AM [Apache] If you need more help, copy and post this
9:58:13 AM [Apache] entire log window on the forums


I have a  complete solution for this topic. so, follow step-by-step guide.

So, let's get started!  😮

Table of Contents

How to modify the default port of Xampp Server (Apache) to any free port.
Step 1: First, navigate to the folder where you have installed your Xampp Software. 
              Or just open the Xampp application.



Step 2:  After that, go to the destination file – apache/conf/httpd.conf ( Simply locate the string                     "Listen 80" by opening the file in a text editor. The initial value is 80. It indicates that the                        Xammp server for your computer is 80. Simply update it now to any desired port. I've adjusted               it to Listen 8080 in this case.)
                   Or click Apache > config > Apache (httpd.conf)


Step 3:  Type: Ctrl +  f

Step 4:  Change the default port to any free port. Simply update it now to any desired port. I've adjusted it to Listen 8080 in this case.  Follow the Pic guide.


Find the string ServerName and then write the same port number you wrote above.





Step 5:  Save file.




Step 6:  Go back and click Admin tab.




you'll see these errors page:


Step 7: To Fix it add : port number in our case:8080 after localhost, in url.




Video tutorials:



Conclusion:

To modify the default port of Xampp Server (Apache), you will need to follow these steps:

  • Open the Xampp control panel and stop the Apache service.

  • Open the Apache configuration file, which is located at "C:\xampp\apache\conf\httpd.conf" in Windows.

  • Find the line that says "Listen 80" and change it to the desired port number. For example, to use port 8080, you would change the line to "Listen 8080".

  • Find all instances of ":80" in the configuration file and replace them with the new port number. For example, you would replace ":80" with ":8080".

  • Save the configuration file and close it.

  • Open the Xampp control panel and start the Apache service.

Once you have completed these steps, Apache will be listening on the new port number and you should be able to access your website by specifying the new port in the URL.

FAQs

The Apache configuration file is typically located at "C:\xampp\apache\conf\httpd.conf" in Windows.
Yes, you can use any free port number to modify the default port in Xampp. However, it's important to note that certain port numbers are reserved for specific purposes. For example, port 80 is reserved for HTTP traffic, and port 443 is reserved for HTTPS traffic. You should choose a port number that is not already in use by another service.
To start the Apache service in Xampp, open the Xampp control panel and click the "Start" button next to the Apache service. To stop the Apache service, click the "Stop" button.
If you encounter an error when modifying the default port in Xampp, it's possible that there is a syntax error in the Apache configuration file. To troubleshoot the error, you can try re-reading the instructions and double-checking your changes to the configuration file. You may also want to search online for a solution to the specific error you are encountering. If you are unable to resolve the issue on your own, you may want to seek help from a qualified IT professional.




Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
Top