Nginx itself can not handle PHP, it is just a Web server, when the request is received, if it is a PHP request, then sent to the PHP interpreter processing, and the results returned to the client.
Nginx is generally the request to send fastcgi
Apache Support for PHP is supported by the Apache MOD_PHP5 module, which is different from the nginx. Nginx is a Third-party fastcgi processor that can parse PHP.
If the source code is compiled and installed in PHP, you need to specify--WITH-APXS2=/
Example
(1). Recompile PHP Again (this method will compile more things, so it is more time-consuming),
(2). To compile the FTP extension individually and then configure PHP to support the extension (this is the way to save time, so choose this way)
In the PHP character encoding conversion we generally use ICONV and mb_convert_encoding to operate, but mb_convert_encoding in the conversion performance than iconv much worse oh.String Iconv (String in_charset, String out_charset, String str) Note:
Front End (nginx+php) ip:192.168.10.8
Back end (independent MySQL) ip:192.168.10.5
Software version: libiconv-1.14.tar.gz mysql-5.1.63.tar.gz php-5.2.17.tar.gz php-5.2.17-fpm-0.5.14.diff.gz Php-5.2.17-max-input-vars.patch
1. Install MySQL on the
Front End (nginx+php) ip:192.168.10.8Back end (independent MySQL) ip:192.168.10.5Software version: libiconv-1.14.tar.gz mysql-5.1.63.tar.gz php-5.2.17.tar.gz php-5.2.17-fpm-0.5.14.diff.gz Php-5.2.17-max-input-vars.patch1. Install MySQL on the back
Why do we use the LNMP architecture?
The advantages of Linux, PHP, MySQL, we do not have to say more.Nginx is a small and efficient Linux Web server software, is by Igor Sysoev for the Russian visit of the second rambler.ru site developed, has been
Linux Software Installation has a lot of, in order to ensure the stability of the server operation, many people will be compiled software to install the source code to install the software; I'll put up the compile process on the VPS, including the
"Ready to Work"#在编译安装lnmp之前, first uninstall the existing RPM package.
The code is as follows
Copy Code
RPM-E httpdRPM-E MySQLRpm-e PHPYum-y Remove httpdyum-y Remove Mysql-server MySQLYum-y Remove PHPYum-y Remove
Linux uses CentOS, the package is unified in the/USR/LOCAL/SRC directory. Because the CentOS source is older, and the update is also relatively slow, here suggest you to replace 163 sources. Tip: If you really intend to install PHP with this kind of
Introduction to the Scripting environmentIi. Introduction to the scriptIntroduction to the function of the script
Introduction to the Scripting environment
This script runs on the Rhel 6.4 versionTo run this script you need to note:1, the host
Building PHP Environment
PHP almost supports all popular databases, almost all system platforms, mixed with C Java Perl and other syntax and custom syntax, is the server-side HTML embedded script
1. Install the PHP package
1. Unzip and release
Based on the Lanny one-click installation package: (including LNMP required software and configuration files)Install Nginx:wget-o/etc/Yum. Repos.d/centos-base.repo http://Mirrors.aliyun.com/repo/centos-7.repowget-o/etc/Yum. Repos.d/epel.repo
I. Overview of memcached
Memcached is a high-performance distributed memory object caching system for dynamic Web applications to mitigate database load. It improves the speed of dynamic, database-driven Web sites by caching data and
Apache + Nginx + MySql + PHP configuration introduction. For more information, see
1. Enable sshd after installing the system and disable the firewall (otherwise, the external link cannot access apache). disable the security system SELinux
I heard that Nginx is very strong. The company's O & M team mentioned Nginx. Today, I manually reinstalled my server. The server system still uses FreeBSD, and the new version 7.2 is used this time.Required software:Nginx 0.6.38Spawn-fcgi-1.6.0Php5-5
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.