How to change the port number in linux php

藏色散人
Release: 2023-03-14 08:26:02
Original
2826 people have browsed it

How to change the port number in linux php: 1. Find the path where the installed PHP7 configuration file is located; 2. Modify the port number through "listen = 0.0.0.0:9000".

How to change the port number in linux php

The operating environment of this article: linux5.9.8 system, PHP7 version, DELL G3 computer

PHP modification port number under Linux

1. Modify the port number of php7

1) The path of the installed PHP7 configuration file is /usr/local/php7/etc

vim /usr/local/php7/etc/php-fpm.d/www.conf
listen = 0.0.0.0:9000
Copy after login

2) Start php

/usr/local/php7/sbin/php-fpm
Copy after login

2. Modify the port number of php5

1) The path of the installed PHP5 configuration file is /usr/local/php5/etc

vim /usr/local/php5/etc/php-fpm.conf
listen = 0.0.0.0:9001
Copy after login

2) Start php

/usr/local/php5/sbin/php-fpm
Copy after login

Recommended learning: "PHP Video Tutorial"

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template