CentOS 6.6 nginx PHP 配置
/*************************************************************************
* CentOS 6.6 nginx PHP 配置
* 说明:
* 在VPS上安装nginx PHP配置,以供有些时候无聊使用。
*
* 2016-11-26 深圳 南山平山村 曾剑锋
************************************************************************/ 一、参考文档:
. CentOS 6.5 yum安装配置lnmp服务器(Nginx+PHP+MySQL)
http://blog.csdn.net/lane_l/article/details/20235909
. PHP-FPM does not automatically start after reboot
http://serverfault.com/questions/459728/php-fpm-does-not-automatically-start-after-reboot
. OpenBSD.Nginx.MySQL.PHP环境搭建手册
http://www.360doc.com/content/10/1211/11/4330887_77027995.shtml 二、安装:
yum install php
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel php-fpm 三、测试php-cgi:
php-cgi -b 127.0.0.1: 四、后台运行php-cgi:
. /etc/rc.d/init.d/php-fpm start
. chkconfig php-fpm on 五、nginx配置:
[root@localhost /]# cat /etc/nginx/conf.d/php.conf
server {
listen ;
server_name localhost; #charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main; location / {
root /home/zengjf/www;
index index.php index.html index.htm;
} #error_page /.html; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
location ~ \.php$ {
root /home/zengjf/www;
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
[root@localhost /]#
CentOS 6.6 nginx PHP 配置的更多相关文章
- CentOS 下 安装 nginx 执行配置命令 ./configure 报错
CentOS 下 安装 nginx 执行配置命令 ./configure --prefix=/opt/nginx --sbin-path=/usr/bin/nginx 时提示以下错误: checkin ...
- CentOS 7 安装Nginx 并配置自动启动
1.官网下载安装包 http://nginx.org/en/download.html,选择适合Linux的版本,这里选择最新的版本,下载到本地后上传到服务器或者centos下直接wget命令下载. ...
- Centos 6.3 nginx代理配置
1. 查看nginx所在位置 $ nginx -t /etc/nginx/nginx.conf 2. 配置 user nobody; #启动服务的用户 worker_processes ; err ...
- Ubuntu/CentOS 系统上安装与配置Nginx
一.在线安装: Ubuntu:sudo apt-get install nginx CentOS: sudo yum install nginx 二.安装后的位置: 1.服务地址:/etc/init. ...
- CentOS mini 和 nginx 的安装和配置要点
1.安装VMware Player 版本:5.0.2 build-1031769 2.安装XShell 版本:Build 0126 3.安装CentOS 版本:6.4-x86_64- ...
- CentOS 7 安装 Nginx 配置反向代理
Linux使用Nginx Yum存储库上安装Nginx,适用于Red Hat Enterprise Linux和CentOS系统. 1.添加设置Nginx Yum存储库 在CentOS中首次安装Ngi ...
- CentOS 8 下 nginx 服务器安装及配置笔记
参考文档 nginx官方文档 安装 在CentOS下,nginx官方提供了安装包可以安装 首先先安装前置软件 sudo yum install yum-utils 然后将nginx官方源加入到yum源 ...
- CentOS 6.5 Nginx 配置
1.安装所有 http功能: ./configure --user=www-data --group=www-data --with-http_ssl_module --with-http_reali ...
- 从零开始学 Java - CentOS 下 Nginx + Tomcat 配置负载均衡
为什么现在有非常多的聪明人都在致力于互联网? 最近在读埃隆·马斯克传记,他说「我认为现在有非常多的聪明人都在致力于互联网」. 仔细一想,好像真的是这样的. 我问了自己一个问题:如果你不敲代码了,你能做 ...
随机推荐
- [转]JDK6和JDK7中的substring()方法
substring(int beginIndex, int endIndex)在JDK6与JDK7中的实现方式不一样,理解他们的差异有助于更好的使用它们.为了简单起见,下面所说的substring() ...
- PHP/MYSQL 查询大数据/遍历表
PHP:PHP 5.3.6 (cli) (built: Jun 15 2011 16:29:50) MYSQL:5.1.51 如果我们有的一张表有几百万或几千万的记录,我们要使用 PHP 将所有的记录 ...
- sql2008 附加数据库出错解决方法
当遇到 无法为此请求检索数据,(Microsoft.SqlServer.SmoEnum)其他信息执行Transact-Sql语句或批处理时发生了异常, Microsoft.SqlServer.Conn ...
- 小记:获取post和get请求。
package com.lixu.httpget_post; import java.io.ByteArrayOutputStream; import java.io.IOException; imp ...
- jq 判断输入数字
jq 判断输入数字 <input id="N_source" name="N_source" type="text" valu ...
- Windows安装配置php+memcached的方法
Windows下Memcached的安装配置方法 1.将第一个包解压放某个盘下面,比如在c:\memcached. 2.在终端(也即cmd命令界面)下输入 'c:\memcached\memcache ...
- 浅析Oracle范式的概念(转载)
范式:英文名称是 Normal Form,它是英国人 E.F.Codd(关系数据库的老祖宗)在上个世纪70年代提出关系数据库模型后总结出来的,范式是关系数据库理论的基础,也是我们在设计数据库结构过程中 ...
- UVa 11375 - Matches
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&p ...
- UITableViewStyleGrouped 模式下 headview 多出一块高度问题
self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView ...
- Program E-- CodeForces 18C
Description Once Bob took a paper stripe of n squares (the height of the stripe is 1 square). In eac ...