How to change port number for apache in WAMP
Click on the WAMP server icon and from the menu under Config Files select
httpd.conf
. A long text file will open up in notepad. In this file scroll
down to the line that reads Port 80
and change this to read Port 8080
,
Save the file and close notepad. Once again click on the wamp server icon and
select restart all services. One more change needs to be made before we are
done. In Windows Explorer find the location where WAMP server was installed
which is by Default C:\Wamp
.
Update : On a newer version of WAMP, click the WAMP server icon > Apache > httpd.conf
, then change the line Listen 80
to Listen 8080
or any port you want.
Update: On 3.1.6 version of WAMP , right click on the wamp server icon in the taskbar ,select "tools"-> "Port used by Apache:80" -> "use a port other than 80", an input box will pop up , input a new port in it,click confirm button , then restart wamp .
Just go to httpd.conf file, for ex. under WAMP environment its situated at:
C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
go to line no. 46 and edit Listen 80
to your requirement for ex.
Listen 8383
newer versions of WAMP uses these 2 lines:
Listen 0.0.0.0:8383
Listen [::0]:8383
Next go to line no. 171 and edit ServerName localhost:80
to your requirement for ex.
ServerName localhost:8383
Restart Apache
and its done !!
Now, you can access with your URL:
http://localhost:8383 or http://192.168.1.1:8383
Hope it helps to people looking for solution here.
From the wampserver 3.x onwards, changing the listening port number of Apache does not require any particular Apache skills (http.conf, virtualhost,...), you just have to click button - assuming you're running Windows OS! :
- In the tray, right click green/running WAMP icon
- Select menu Tools
- In the section Port used by Apache: xx, click Use a port other than 80 (i.e. default port configuration)
- Enter the desired port number in the popup window - usually 8080 as alternative Web port
NB: For alternative port: check official IANA Service Name and Transport Protocol Port Number Registry