Sometimes, your project would require you to have two web servers running in your local computer or your development environment. In cases like this, you need to specify different port numbers to web servers like Apache and IIS to avoid conflict. The default port number of web server is port 80. You need to change this number ine one of your web servers in order to make the two web servers work concurrently.
If you decide to change the port number of IIS in Windows XP, it’s easy.
- Click the Start Button -> Control Panel -> Administrative Tools -> Internet Information Service.
- IIS Manager opens. In the left side of the panel, click Web Sites -> Default Web Sites.
Right click Default Web Sites and click Properties. - Properties Dialog opens. Look for the Web Site Tab. Under Web Site Tab, change the port number from the default port number 80 to say, for example 8000. Be careful in replacing the port number because there are port numbers that are already pre-assigned to other services (SQL Server is port number 1433, mail is port 25 etc).
- Click Ok and exit.
To access this server, simply type in the web address of the browser
http:\localhost:8000\
Where 8000 is the port number you indicated.
On the other hand, if you want to change the port number of Apache web server instead of the IIS, follow this instruction:
- 1. Look for the file httpd.conf in the Apache folder. (Do a search if you have hard time finding where the Apache folder was installed). If you’re using XAMPP, its under the c:\xampp\apache\conf directory.
- Open the httpd.conf using Notepad.
- In the file, find the following section:
## Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the # directive.
## Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
##Listen 12.34.56.78:80
Listen 80 - Simply change the number after the word Listen to the port you want it to use, say for example, port 8020.
- Save the file and restart Apache. To restart Apache using the XAMPP control panel, simply click the Stop and when it stops, click Start.
Be aware though that you will have to reconfigure any firewalls and routers to forward requests to your new port. Also, some people may have problems accessing your website if it is not on port 80 or the alternative 8080.
0 Comments:
Subscribe to:
Post Comments (Atom)