码迷,mamicode.com
首页 > 数据库 > 详细

Nginx php-fpm php mysql

时间:2015-12-21 15:58:50      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:

  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

标签:

原文地址:http://www.cnblogs.com/baxk/p/5063404.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!