Ask PHP7 how to restart PHP-FPM and how to remove x-powered-by:php?

Source: Internet
Author: User
Background:
Server: CentOS7 + nginx/1.9.15 + PHP7.0.8 + Mysql

Reason:
Found in the response header: x-powered-by:php/7.0.8
Trying to get rid of it.
Then modify the php.ini file, set the expose_php to off, and then restart Nginx,
Found the goods are still there good.
It is not known if the PHP-FPM did not restart, but found that PHP-FPM did not restart the option.

Ask the gods how to deal with the above situation?
How do I restart php-fpm and how do I get rid of x-powered-by?
Thank you

Summary: If the php.ini has been modified, in addition to restart Nginx, for CentOS need to PHP-FPM process kill, and then start, so that the changes will be effective!

Reply content:

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

Reason:
Found in the response header: x-powered-by:php/7.0.8
Trying to get rid of it.
Then modify the php.ini file, set the expose_php to off, and then restart Nginx,
Found the goods are still there good.
It is not known if the PHP-FPM did not restart, but found that PHP-FPM did not restart the option.

Ask the gods how to deal with the above situation?
How do I restart php-fpm and how do I get rid of x-powered-by?
Thank you

Summary: If the php.ini has been modified, in addition to restart Nginx, for CentOS need to PHP-FPM process kill, and then start, so that the changes will be effective!

PS aux | grep php-fpm

Find the PID, then kill the PID

and then
/usr/local/php7/sbin/php-fpm
Start

How to get rid of x-powered-by? Your operation is right, if not, see which directory php.ini is reading

Php-i | grep php.ini, and then the corresponding modifications are good

Ubuntu is: sudo service php7.0-fpm Restart, you can refer to the next try Haha

No php-fpm used on CentOS, but used on Ubuntu, restart command is sudo service php5-fpm restart . For reference only.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.