How to change port number of apache server in Windows OS?

how to change port number of Apache server in windows OS

  • I have installed xampp control panel and Apache 2.2 on windows XP when I type http://localhost/ gives me page which says It Works! Now, I want to change the port number 80 to some other number How to change it ? in how many files does it needs to be changed ? dose it require to restart the system to change to take effect ? Note: I have changed port number in C:\xampp\apache\conf\httpd.conf in two places where it says Listen 80 and ServerName localhost:80 Pls help, thanks.

  • Answer:

    Go to your httpd.conf file and on about like 40ish change: Listen 80 to: Listen 1234 Or whatever port you choose!

jesop at Server Fault Visit the source

Was this solution helpful to you?

Other answers

Go to your apache-tomcat Installation folder there you find conf folder inside that server.xml file will be there.. You can change the port number and configuration setting for your server. Drive:\apache-tomcat\conf\server.xml

Vinayak.B

thanks for response but only changing port number in: C:\xampp\apache\conf\httpd.conf didn't work (apache couldn't start) so with above mention change, we have to change port number in another file to make it work i have changed in : C:\xampp\apache\conf\extra\httpd-ssl.conf in above file find (if port number you want is 85) Listen 443 change it to Listen 85 find change it to find ServerName localhost:443 change it to ServerName localhost:85 the port number in C:\xampp\apache\conf\httpd.conf and C:\xampp\apache\conf\extra\httpd-ssl.conf should be different. restart Apache service in XAMPP Control Panel and type in your browses address bar : http://localhost:'port number'/

jesop

It is quite easy .You need to make few changes to httpd.conf file as follows: Listen 80 to Listen 8080 and ServerName localhost:80 to ServerName localhost:8080 For more detailed info with screenshots ,you can refer this - http://www.superpctricks.com/2013/11/running-iis-and-apache-on-same-server.html

Amar

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.