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.

link|improve this question
1  
Is there a programming question here? – gabe Mar 9 '10 at 5:12
just to change the port number... is programming needed? – jesop Mar 9 '10 at 5:49
feedback

migrated from stackoverflow.com Mar 9 '10 at 6:39

This question came from our site for professional and enthusiast programmers.

3 Answers

Go to your httpd.conf file and on about like 40ish change:

Listen 80

to:

Listen 1234

Or whatever port you choose!

link|improve this answer
feedback

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

link|improve this answer
feedback

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'/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown