Please tell me how to restart php-fpm in php7 and how to remove X-Powered-By:PHP?

WBOY
Release: 2016-08-18 09:15:59
Original
2442 people have browsed it

Background:
Server: CentOS7 + nginx/1.9.15 + PHP7.0.8 + Mysql

Reason:
I found that the response header contained: That's good.
I don’t know if it’s the reason why php-fpm didn’t restart, but I found that php-fpm doesn’t have the option to restart.

May I ask the experts how to deal with the above situation?
How to restart php-fpm and how to remove X-Powered-By?

Thank you



Summary: If there are modifications to php.ini, in addition to restarting nginx, for centOS, you need to kill the php-fpm process and then start it again, so that the modifications will be effective!


Reply content:

Background:

Server: CentOS7 + nginx/1.9.15 + PHP7.0.8 + Mysql

Reason:
I found that the response header contained: That's good.

I don’t know if it’s the reason why php-fpm didn’t restart, but I found that php-fpm doesn’t have the option to restart.


Please ask the masters how to deal with the above situation?
How to restart php-fpm and how to remove X-Powered-By?
Thank you

Summary: If there are modifications to php.ini, in addition to restarting nginx, for centOS, you need to kill the php-fpm process and then start it again, so that the modifications will be effective!



ps aux | grep php-fpm


Find the pid, then kill the pid

Then start

/usr/local/php7/sbin/php-fpm

How to remove X-Powered-By? Your operation is correct. If it doesn’t work, check which directory php.ini is reading from

php -i | grep php.ini, and then modify it accordingly



Ubuntu is: sudo service php7.0-fpm restart, you can refer to it and try it haha

I have not used php-fpm on CentOS, but I have used it on Ubuntu. The restart command is

sudo service php5-fpm restart

. For reference only.

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!