nginx+php (fastcgi) for Arm-linux

Source: Internet
Author: User
Tags fpm

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

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.