nginx php-fpm

1. nginx php-fpm

  1. yum install nginx
  2. yum install php-fpm
2. 配置 nginx.conf
  1. location ~ \.php$ {
  2. root /usr/share/nginx/html;
  3. fastcgi_pass 127.0.0.1:9000;
  4. fastcgi_index index.php;
  5. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  6. include fastcgi_params;
  7. }
3. 启动php-fpm && nginx
  1. systemctl restart nginx
  2. systemctl restart php-fpm
  3. systemctl enable nginx
  4. systemctl enable php-fpm
 
  
 
 
 
 
 
     

posted on 2017-04-26 22:24  荣锋亮  阅读(264)  评论(0编辑  收藏  举报

导航