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.
Steps to change the apache port:
1. Go to the apache installation directory
2. Enter the apache configuration file directory conf
3. Right-click to edit the apache configuration file httpd.conf
5. Use ctrl f to quickly search for Listen
. 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.
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!