简体   繁体   中英

I need to change port number on apache http server

Instructions

1 Log on to your Apache server computer with an administrator account.

2 Open the Start menu and click on the "My Computer" icon.

3 Navigate to the C:\\wamp\\Apache2\\conf directory on your server's main hard drive or the drive where WAMP has been previously installed.

4 Find the file labeled "http.conf" and double-click on it to open it in the Windows Notepad application.

5 Press the "control" and "F" keys at the same time to launch the search utility.

6 Type "80" into the search field and hit "Find Next." You will now be taken to the part of the configuration file where the localhost port is set.

7 Change "80" to the port of your choice and then save the "http.conf" file to update your server. You may need to restart your server in order for the new port to be recognized.

The item you're searching for in the configuration file is "Listen". Default value is 80, which is standard for HTTP.

Example:

Listen 8000

reference: http://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen

Simple and Quick. Open Apache configuration file "httpd.conf" by default it runs on 80 port. so you can change it to any value. Here i am changing 80 to 81.


eg. "Listen 80" to "Listen 81" Now re-start the apache web server. Thats it. you are done with it. Thanx.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM