Articles in categories

Now on Amazon

Change Xampp port

Why change the Xampp Apache Server port?

It's possible that port 80 (Apache Server's standard port) is being used by some other application and you don't want, or aren't allowed, to change the other application's port.
If this is the case Apache Server will not start and you'll need to change Apache's port.

How to change the port? 

  1. Go to your xampp installation folder and find the folder: C:\xampp\apache\conf
  2. In here find the file 'httpd.conf' and open it with a text editor
  3. Find the line 'Listen *:80' and change it to 'Listen *:8080'.
  4. Next find the line 'ServerName localhost:80' and change it to 'ServerName localhost:8080'
  5. Save the file.
  6. Next go to folder 'C:\xampp\apache\conf\extra' and open the file 'httpd-ssl.conf'
  7. In this file find the line 'Listen 443' and change it to 'Listen 4499'
  8. Next find the line 'ServerName localhost:443' and change it to 'ServerName localhost:4499'.
  9. Save the file.

Restart the Apache Server to have the change take effect.
This way I was able to get Apache up and running again. Only changing the 'httpd.conf file wasn't enough for me, I had to change the  'httpd-ssl.conf' file to or Apache still wouldn't start. Why? I don't know.

How to use the new port?

Just add the port number to your url like this http://localhost:8080/ and you should see the xampp page.

Note: You won't see the new Apache Port number in the Xampp control panel. This is a bug in Xampp. Even though you have changed the port, it will still show port 80.

Xampp_port_number