Home > Backend Development > PHP Tutorial > LNMP environment construction (2) Integrating Nginx and PHP

LNMP environment construction (2) Integrating Nginx and PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-08 09:31:22
Original
994 people have browsed it

There are many ways to install Nginx. Here we compile the source code for installation and use the following commands:


If the following error occurs during the installation process:


You need to install PCRE first:


Installation After completion, the Nginx installation directory is /usr/local/nginx.

Next, modify the nginx configuration file (/usr/local/nginx/conf/nginx.conf) so that it can handle PHP scripts:

Finally, when starting Nginx, you need to first Start PHP-FPM.


For Nginx restart and shutdown operations, you can use the following commands:


And PHP-FPM It is more troublesome. You need to use ps -ef | grep php-fpm to get the process ID of the master process, and then use kill -USR2:

Note: -USR2 parameter is restart, -INT parameter is Close

The above introduces the LNMP environment construction (2) Integrating Nginx and PHP, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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
Latest Issues
Error restarting nginx
From 1970-01-01 08:00:00
0
0
0
server - Nginx configuration webapp problem
From 1970-01-01 08:00:00
0
0
0
Nginx default.conf problem
From 1970-01-01 08:00:00
0
0
0
centos7 - NGINX exception occurs
From 1970-01-01 08:00:00
0
0
0
nginx load balancing
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template