This quick post is about changing default port in Apache. Say if you wanted to work with IIS and Apache both. Now, both web server uses port 80 and so you can’t have both of them at the same time. So one has to sacrifice it’s favorite port Open-mouthed smile. In my case it was Apache not because I am MSFT technology user but just because I am working with Apache just as sort of self improvement project and most of the time I will want have to work with IIS. So I need to change default port of Apache listen to some other number then 80, which is very simple process.

All you need to do is to locate “httpd.conf” file and look for section where it mentions about listening port. Something similar below,


#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

Change this port 80 to any other free port you want to use for your purpose. And then start (or restart, if already running) Apache server and you should be able to access apache server with newer port using, http://localhost:90/  (in my case I set it up for port 90)

That’s it for now.

It’s Just A Thought … Fingers crossed

Gaurang Sign

P.S. if you have installed WAMP server on newer system then you will need to have Microsoft Visual C++ 2008 Redistributable Package (either x86 or x64 depending on your system architecture)

Random Posts:


Similar Posts: