Home  >  Article  >  Operation and Maintenance  >  How to change apache port

How to change apache port

青灯夜游
青灯夜游Original
2019-06-14 15:14:185730browse

When using apache to build a PHP development environment, we often encounter situations where the port is occupied. We can kill the process using port 80 or modify the default port 80 of apache. The following article will introduce to you how to modify the apache port. I hope it will be helpful to you.

How to change apache port

Steps to change the apache port:

1. Go to the apache installation directory

How to change apache port

2. Enter the apache configuration file directory conf

How to change apache port

3. Right-click to edit the apache configuration file httpd.conf

How to change apache port

5. Use ctrl f to quickly search for Listen

How to change apache port

. Go to the Listen 80 line and change 80 to another unoccupied port number. I changed it to 90 here and saved the current changes.

How to change apache port

How to change apache port

6. Restart apache to make the new configuration take effect.

Click "Start" > "Run" > Enter cmd > Enter > Navigate to the apache installation directory to the bin directory, and then enter the "httpd-k start" command.

7 , after opening the browser, you can access it through 127.0.0.1:90

The above is the detailed content of How to change apache port. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn