These days, it is a common scenario that a web developer needs to use multiple web servers, all running at the same time. For example, an XAMPP server can be used to run the local WordPress blog, while a JBoss server also needs to be up for testing a java web application or IIS server for serving your .Net app. In such scenarios, if two or more servers are trying to use the same port number, then the late comer will fail to get the port.
Take the case of XAMPP server. By default, XAMPP runs at the port 80, and IIS also use the port 80. So, you cannot run these two server at the same time. In order to avoid this issue, the XAMPP port can be modified to use a different number other the default 80.
Follow these steps to change the XAMPP server port number:
- Stop the XAMPP server, if it is running already.
- Open the file [XAMPP Installation Folder]/apache/conf/httpd.conf. As the names suggests, httpd.conf is the file which defines the properties of the Apache server, which the XAMPP is using.
- Now search for the string Listen 80 (I’m assuming that your XAMPP was using the port 80. Otherwise, just search for the string Listen). This is the port number which XAMPP uses. Change this 80 to any other number which you prefer. (Sorry, you can’t use billion here, as only 65536 ports are supported by computers).
- There is one more step to do. In the same file, search for the string ServerName. This options defines the server name of the XAMPP server, which includes the port number also. So, it is important to update this port number also.
- Now save and re-start XAMPP server and you are done.
{ 13 comments… read them below or add one }
this will work out for Apache(httpd) also.
Yes Kumar. In fact, XAMPP uses the Apache as it’s web server.
Thanks,
I knew what I needed to do but couldn’t remember where the lines were in and in which files.
Saved me a bunch of time.
You are welcome.
tried that, did not work
still not able to start apache service
changed skype port
works fine now
it might have happened because of conflicting port numbers between skype and XAMPP.
been trying all day to get apache running and all i needed to do was shutdown skype!
Hay all.. great advice for the skype didn’t realize it …….. any way.. I am trying to get my web server to be able to access from internet or just by another computer on my network.. for time being… Figured about changing ports but not sure how to access it from new port can some one help….. Like http://yoursite.com/8080 ……….. Find me on my community above to contact me.
thanks… Keep up the great tips.. guys.. really useful info.
After changing the port in httpd.conf You can access the login page typing http://localhost:portNumber
http://xx.xx.xx.xxp:PortNumber (which you changed in httpd.conf eg: http://10.0.10.111:8181
Nagaraj
i’ve tried that solution. but apache still uses port 80. when i click ‘status’ on the Xampp control panel and the browser refuses connection. Please respond urgently,i’m on a deadline!
@wole
Even after changing the port number as mentioned above, the XAMPP control panel usually displays Apache port as 80. but don’t worry about that. Re-start the XAMPP server and the port change will work.
In skype select options dialog. In Advanced > connection tab, there is an option Use port 80 as … uncheck the option will solve the skype issue. Also make sure in windows the apache application is added automatically or manually to the firewall exception. What i still missing is although my apache status was ok my XAMPP messages shows wrong port. I was just searching for that..
I think even though you change the port number in XAMPP, the XAMPP control panel still shows the original port (i.e. 80). But the XAMPP Apache just works fine with the modified port.
{ 2 trackbacks }