Home > Article > Backend Development > How to set php port
How to set the php port: 1. Use a text editing tool to open the \apache\conf\httpd.conf configuration file; 2. Find the "Listen 80" configuration in the configuration file; 3. Modify the port according to your own needs Just use the number, such as 8080.
First use the editing tool to open the \apache\conf\httpd.conf file;
(Recommended tutorial: php Graphic tutorial)
Then find the following configuration in the file:
# Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 #修改这里
(Video tutorial recommendation: php video tutorial)
Finally Just modify the port number as needed, such as 8080.
When accessing, enter "http:/localhost:modified port number" in the browser.
The above is the detailed content of How to set php port. For more information, please follow other related articles on the PHP Chinese website!