Home  >  Article  >  Backend Development  >  [Introduction to PHP] How to modify the port number of Apache in PhpStudy

[Introduction to PHP] How to modify the port number of Apache in PhpStudy

little bottle
little bottleforward
2019-04-18 16:00:013758browse

phpStudy is a program integration package for PHP debugging environment. This package integrates the latest Apache PHP MySQL phpMyAdmin ZendOptimizer. It can be installed once and can be used without configuration. It is a very convenient and easy-to-use PHP debugging environment. In the Apache website server, if port 80 is occupied, the Apache server may fail to start. You can use PhpStudy to modify the port number of the Apache server, such as changing it to port 8080.

(1) Find the Apache configuration file httpd-conf file.

First start PhpStudy, then select Other options menu in the lower right corner of the interface, click and select the submenu Open the configuration file, and select httpd-conf , as shown below:

(2) In the opened httpd-conf file, find port 80, and you can find the following setting item

#Listen 12.34.56.78:80
Listen 80 //This sentence means: tell Apache to listen to port 80

At this time, change port 80 to the port number you need to set, such as Port 880 or port 8080.

(3) After the modification is completed, save the file, then return to the initial interface of phpstudy and restart the service.

(4) If the port number of Apache is not port 80, when debugging the local website, you must add the port number to the URL address. If it is set to port 808, you need to use: 127.0 for local debugging. 0.1:808 or localhost:808

Related tutorials: php from entry to master

The above is the detailed content of [Introduction to PHP] How to modify the port number of Apache in PhpStudy. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete