1 Yum Installation
Yum install PHP, PHP-FPM
Yum Install Nginx
Install Nginx before you need to go to nginx official Download Yum Warehouse installation package
Http://nginx.org/en/linux_packages.html
Then you can install the
2. Nginx Configuration
Configuration file is/etc/nginx/nginx.conf (copy Nginx.conf.default to nginx.conf)
The point to note is the server module, which is the module that configures the virtual host
server_name is to configure the access domain name
Location/{} Configure the Web root directory
Location ~ \.php${} Configure PHP-FPM listening address and PHP script directory
3PHP-FPM Configuration
Open/etc/php-fpm.d/www.conf
Configure user and group, I specify Nginx users and Groups
Php-fpm.conf can not be configured first
4. Start
Php-fpm-d (-d specifies daemon mode startup)
Nginx so start Nginx, stop and reload the configuration file, exit, reopen Nginx-s [Stop, Reload, quit, reopen]
Reference:
Http://nginx.org/en/docs/beginners_guide.html
Http://www.2cto.com/os/201210/164154.html
Http://www.2cto.com/os/201212/178528.html
Http://www.nginx.cn/231.html
http://blog.csdn.net/seanchan/article/details/7680354
Nginx and PHP, PHP-FPM installation configuration