Nginx and php installation and configuration 4: nginx and php start or restart

不言
Release: 2023-03-23 19:30:02
Original
1817 people have browsed it

The content shared with you in this article is about the installation and configuration of Nginx and PHP. The fourth step is to start or restart nginx and PHP. It has a certain reference value. Friends in need can refer to

Restart the service ( Start ignoring the first step):

a): Shut down the nginx service: sudo/usr/local/nginx-1.8.0/sbin/nginx -s stop


b): Close the php-fpm service: kill allphp-fpm

(If this command cannot be turned off, just find the process number and kill it: sudo netstat -anp |grep php) kill -9 process number

(Aboutphp -fpm appears127.0.0.1:9000Already occupied):

netstat -lntup | grep 9000

killall php-fpm


c): Enable php-fpm: (Reload the latest data in the php.ini configuration)

sudo /usr/local/php/sbin/php-fpm -c/ etc/php.ini -y /usr/local/php/etc/php-fpm.conf

(requires manual loading php.inifile)


##d): Start nginx service: sudo /usr/local/ nginx-1.8.0/sbin/nginx

Related recommendations:

Nginx and PHP installation and configuration three nginx configuration files

Nginx and php installation and configuration 2. Installation and configuration php-fpm

Nginx and php installation and configuration 1. Compile and install nginx-1.8.0

The above is the detailed content of Nginx and php installation and configuration 4: nginx and php start or restart. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!