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 配置 ...
随机推荐
- No.004 Median of Two Sorted Arrays
4. Median of Two Sorted Arrays Total Accepted: 104147 Total Submissions: 539044 Difficulty: Hard The ...
- 初识Ruby
以下为看<七周七语言>的第一课,找到答案,参考资料来源于http://book.douban.com/annotation/27705657/ Ruby API文档在这里http://ru ...
- ButterKnife的简单使用
刚刚学习Android,也不知道算不算已经入门!但是总感觉自己没有什么提高,所以就把一些学习内容写一遍下来. 今天接触了ButterKnife这个第三方框架 GitHub地址:https://gith ...
- 揭秘TPM安全芯片技术及加密应用
揭秘TPM安全芯片技术及加密应用 首发:http://safe.it168.com/a2012/0912/1396/000001396884.shtml 从2003年开始,重要数据丢失已经成为严重的信 ...
- 【drp 1】使用易宝实现在线支付
导读:在很多网站上,都会涉及到在线支付的功能,总所周知的有:淘宝.天猫.京东等等.我们常见的支付方式有支付宝.微信钱包.银行卡支付等.本篇博客,将介绍一种使用易宝第三方软件进行在线支付的功能. 一.基 ...
- 使用throws抛出异常
声明抛出异常实在一个方法声明的throws子句中指明的.throws子句方法的基本形式如下.方法 throws 异常列表{ }throws子句中可以指明多个异常,说明该方法不对这些异常进行处理,而是抛 ...
- 右下角弹出"Windows-延缓写入失败"或者"xxx-损坏文件 请运行Chkdsk工具"
知识点分析: 任务栏右下角弹出“Windows-延缓写入失败”或者“xxx-损坏文件 请运行Chkdsk工具”. 操作步骤: 方法一:Chkdsk工具 在开始---运行中输入cmd,然后输入chkds ...
- Chrome 使用技巧
阅读目录 写在前面 快速切换文件 在源代码中搜索 在源代码中快速跳转到指定的行 使用多个插入符进行选择 设备模式 设备传感仿真 格式化凌乱的js源码 颜色选择器 改变颜色格式 强制改变元素状态(方便查 ...
- JAVA编程思想第一题出现错误
//: object/E01_DefaultInitialization.java public class E01_DefaultInitialization{ int i ; char c ; p ...
- Python-2.7.11+Django-1.9.4安装配置
1.去python官网下载2.7的最新版本 https://www.python.org/downloads 1.1 解压Python-2.7.11.tgz tar xvf Python-2.7.11 ...