Home > Backend Development > PHP Problem > How to change php port number

How to change php port number

藏色散人
Release: 2023-03-08 19:50:02
Original
4821 people have browsed it

How to modify the PHP port number: first find the path to the PHP configuration file; then modify the port number through "listen=0.0.0.0:9000"; finally restart PHP.

How to change php port number

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

Change the port number of php7 under Linux

The path where the installed PHP7 configuration file is located is /usr/local/php7/etc

1. Modify the php7 port number

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

Start php

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

The path where the installed PHP5 configuration file is located is /usr/local/php5/etc

2. Modify the php5 port number

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

Recommended study: "PHP Video Tutorial

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

Related labels:
php
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