Prior to this I have tested nginx, personal experience has been successful! Thank you for your support!! Today, let's talk about the support of nginx+php (FASTCGI).
in this version I was using NGINX+PHP-FPM.
1. Compiling and installing PHP
1.1 Entering the PHP file
#cd php-7.0.4
1.2 Configuring PHP Files
#CC =arm-hisiv200-linux-gcc cflags=-el ldflags=-el./configure--prefix=/user/php--disable-all--host=arm-linux --disable-phpdbg--PHP-FPM
1.3 Compiling & Installing
#make
#make Install
2. Copying files to the target board
2.1 into the installed PHP file (after compiling and installing, you can see the installed files under/user/php)
#cd/user/php
# ls
2. Configure fastcgi Mode
followed by the previous/user/nginx under the four files to operate.
Configure the PHP fastcgi mode for nginx.conf:
Location ~ \.php$ {
root HTML;
Fastcgi_pass/var/run/php-cgi.sock;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Include Fastcgi_params;
}
Release these annotations so that the fastcgi mode is supported.
3. Execute test File
3.1 Execute PHP-FPM First
#./SBIN/PHP-FPM
3.2 In the execution nginx
#./nginx-c. /conf/nginx.conf
4. Problem set
1) Questions:
When you follow my above, you will find this problem, an error occurred appears in the Web page
Solve:
Find the www.conf in PHP
Add under listen=127.0.0.1:9000
Listen =/var/run/php-fpm.sock can be
Save exit, in execution, you can access it normally.
nginx+php (fastcgi) for Arm-linux