How to set the access port in php: 1. Find and open the httpd.conf configuration file; 2. Find the Listen 80 configuration in the configuration file; 3. Modify the port number as needed, such as Listen 8080.
The operating environment of this article: windows10 system, php 7, thinkpad t480 computer.
The specific steps to set the access port are as follows:
First use the editing tool to open the \apache\conf\httpd.conf file;
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 #修改这里
Finally, modify the port number as needed, such as 8080.
When accessing, enter "http:/localhost:modified port number" in the browser.
Recommended learning: php training
The above is the detailed content of How to set access port in php. For more information, please follow other related articles on the PHP Chinese website!