How to set that which one will use localhost port

2019-09-16 22:26发布

问题:

I have tried to install WAMP, APPServ but when i go to http://localhost it go into XAMPP which is previously install on the computer. how to select that which one i am going to use on localhost.

回答1:

Edit http.conf file in notepad usually located in C:\wamp\Apache2\conf .

then do either CTL+F or go to EDIT/FIND from the notepad menubar. this will open FIND window.

type 80 in the 'Find What' box and click find next. replace 80 to whichever port to want apache to listen to. you may have to change to two or more places depending on your configuration. and then restart your apache server. Apache should listen to the port you set in the http.conf file. Hope this helps



回答2:

You can change the port they work on, by default the its port 80, you can for example set the WAMP to port 8080 and then use to access WAMP: http://localhost:8080 and to access APPServ : http://localhost

They will not work at the same default port 80 at the same time.



回答3:

Open C:\xampp\apache\conf, find the httpd.conf file and open with notepad++. Look for these lines and change 80 in the last line any other port, for example 8080.

Listen 8080

This way we will be able to run Apache but the http://localhost/url won’t work for that you need to append port number into the URL. For example if you specify Port 8080 in Apache config, you have to specify the URL like this, http://localhost:8080/url.

restart apache.



标签: localhost