centos php-fpm nginx配置
移除旧的软件包:
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配置的更多相关文章
- CentOS 7 安装 Nginx 配置反向代理
Linux使用Nginx Yum存储库上安装Nginx,适用于Red Hat Enterprise Linux和CentOS系统. 1.添加设置Nginx Yum存储库 在CentOS中首次安装Ngi ...
- centos 6.9 +nginx 配置GIT HTTPS服务器(证书采用自签名)
第一部分原通过SSH访问的GIT服务器迁移 1.把原服务器GIT资源库目录完成复制至新的服务器 2.安装GIT服务器 新的服务器 创建用户 useradd git password git 下载GIT ...
- 在CentOS上安装Nginx配置HTTPS并设置系统服务和开机启动(最全教程)
友情提示:全部配完大约需要20分钟,本教程配合 xshell 和 xftp 使用更佳. 系统配置:CentOS 7.5 本教程 摘繁华 版权所有. 操作按键 常用按键: 复制操作:Shift+Ins ...
- CentOS 6.5 Nginx 配置
1.安装所有 http功能: ./configure --user=www-data --group=www-data --with-http_ssl_module --with-http_reali ...
- centos下使用nginx 配置websocket,https升级wss协议
服务端代码/***/ // 服务端代码 var express = require('express'); var app = express(); var path = require('path' ...
- 【CentOS 7】nginx配置web服务器
1,安装过程 [root@VM_1_14_centos ~]# cd /data/ [root@VM_1_14_centos data]# wget http://nginx.org/download ...
- 一些NGINX配置
一些nginx配置 使用独立目录, 然后include具体配置 gzip on for multi processers static file cache proxy pass 静态目录 or 文件 ...
- CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL)
CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL) 一.准备篇: /etc/init.d/iptables stop #关闭防火墙 关闭SELINUX vi /etc/sel ...
- LNMP搭建(CentOS 6.3+Nginx 1.2.0+PHP 5.3.15(fpm)+ MySQL 5.5.35)
Nginx (“engine x”) 是一个高性能的 HTTP 和反向代理服务器,也是一个 IMAP/POP3/SMTP 代理服务器. Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 ...
- CentOS 6.6 nginx PHP 配置
/************************************************************************* * CentOS 6.6 nginx PHP 配置 ...
随机推荐
- 跟我学 NHibernate (二)
1. 在 NHibernate 中使用事务, 主要代码如下: #region 事务 public IList<Customer> GetAll() { // 开启事物 using (ITr ...
- linux Apache和php配置
今天安装Apache httpd web服务器,安装过程分为三部分: (1)./configure (2)make (3)make install (需要root权限) 我的apache 安装在/ho ...
- LINQ to DataSet的DataTable操作
1. DataTable读取列表 DataSet ds = new DataSet();// 省略ds的Fill代码DataTable products = ds.Tables["Produ ...
- SVN与TortoiseSVN实战:属性的奇技淫巧(二)
硬广:<SVN与TortoiseSVN实战>系列已经写了七篇,本系列结合TortoiseSVN对SVN中容易被忽视的部分进行了详解. 关于属性的奇技淫巧较多,分为两篇来写,第一篇详见< ...
- python jinjia2模板使用
https://gist.github.com/wrunk/1317933 #!/usr/bin/env python # -*- coding: utf-8 -*- from jinja2 impo ...
- C puzzles详解【51-57题】
第五十一题 Write a C function which does the addition of two integers without using the '+' operator. You ...
- 个人博客实现Archives查询小记
这两天正在做博客,刚刚遇到一个问题,就是需要在主页实现文档分类功能,即通过日期将文章进行按日期进行分类. 比如这样的: 我个人的想法是,查询所有文章的日期,然后将日期进行格式化,只留下年份和月份,然后 ...
- Memento
#include <iostream> #include <string> using namespace std; class Memento { public: Memen ...
- Javascript 补位运算符
看到一个题目~~3.14得到是3,一下子有点蒙,之前在Javascript中完全没有见过~这个运算符.经查才知道~是补位运算符,但是跟原码反码补码又有点不同(在反码这一块,不记正负),好吧,大学的东西 ...
- POJ C程序设计进阶 编程题#4:寻找平面上的极大点
编程题#4:寻找平面上的极大点 来源: POJ (Coursera声明:在POJ上完成的习题将不会计入Coursera的最后成绩.) 注意: 总时间限制: 1000ms 内存限制: 65536kB 描 ...