Nginx php-fpm php MySQL

Source: Internet
Author: User
Tags fpm php mysql

    1. RPM-IVH http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
    2. Yum-y Install Nginx
    3. Yum-y PHP-FPM
    4. Service PHP-FPM Restart
    5. Service Nginx Restart
    6. Chkconfig PHP-FPM on
    7. Chkconfig Nginx on
    1. server {
    2. Listen 80;
    3. server_name localhost;
    4. AutoIndex on;
    5. #charset Koi8-r;
    6. #access_log/var/log/nginx/log/host.access.log Main;
    7. Location/{
    8. Root /var/www/html;
    9. Index index.html index.htm index.php;
    10. }
    11. Location ~ \.php$ {
    12. Root /var/www/html;
    13. Fastcgi_pass 127.0.0.1:9000;
    14. Fastcgi_index index.php;
    15. Fastcgi_param script_filename /var/www/html$fastcgi _script_name; # $document _root
    16. Include Fastcgi_params;
    17. }....

vi/var/www/html/index.php

<?php
Phpinfo ();
?>

Nginx php-fpm php MySQL

Related Article

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.