码迷,mamicode.com
首页 > Web开发 > 详细

centos php-fpm nginx配置

时间:2015-08-06 20:00:15      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:

移除旧的软件包:
yum remove httpd* php*
安装:
yum install php php-fpm yum install php-gd php-mysql php-mbstring php-xml php-mcrypt
验证配置文件: /etc/init.d/nginx configtest
重启: /etc/init.d/nginx restart /etc/init.d/php-fpm restart 出现这个错误可能是路径写错了: Access denied. nginx php-fpm 访问.php文件出现Access denied

也可能是权限,改为nginx: vi /etc/php-fpm.d/www.conf ; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user‘s group ; will be used. ; RPM: apache Choosed to be able to access some dir as httpd user = nginx ; RPM: Keep a group allowed to write in log dir. group = nginx nginx节点配置示例: server { listen 80; server_name domain; root /wwwdir; location / { index index.html index.htm index.php; } # location ~ \.php$ { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }

  

centos php-fpm nginx配置

标签:

原文地址:http://www.cnblogs.com/sban/p/4708871.html

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