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 配置负载均衡
为什么现在有非常多的聪明人都在致力于互联网? 最近在读埃隆·马斯克传记,他说「我认为现在有非常多的聪明人都在致力于互联网」. 仔细一想,好像真的是这样的. 我问了自己一个问题:如果你不敲代码了,你能做 ...
随机推荐
- HDU 2546(01背包)
饭卡 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissi ...
- BZOJ1747 [Usaco2005 open]Expedition 探险
首先我们可以发现如果错过了一个加油站,而继续往前走的时候没有油了,可以再假装之前经过加油站的时候加过油 于是我们维护一个大根堆,表示错过的加油站是哪些,每当没有油的时候从堆顶取出最大值加上去即可 /* ...
- Singleton、MultiThread、Lib——实现单实例无锁多线程安全API
前阵子写静态lib导出单实例多线程安全API时,出现了CRITICAL_SECTION初始化太晚的问题,之后查看了错误的资料,引导向了错误的理解,以至于今天凌晨看到另一份代码,也不多想的以为s ...
- cisco nat
1.配置端口: int s0/0 ip nat outside ;s0/0为外部端口 int f0/0 ip nat inside ...
- spring mvc设置字符集过滤器
<filter> <filter-name>springEncoding</filter-name> <filter-class> org.spring ...
- 判断数据库内容,在页面显示自定义数据case when
判断数据库内容,在页面显示自定义数据 case when...then ...else...end 比如:数据库内容是这样: 通过sql语句判断,数据库的name字段,内容是月桂的,显示嫦娥,其他的显 ...
- ROS语音识别
一.语音识别包 1.安装 安装很简单,直接使用ubuntu命令即可,首先安装依赖库: $ sudo apt-get install gstreamer0.10-pocketsphinx ...
- 【Noip2012】解题报告【字符】【贪心】【高精度】【倍增】【set】
目录:1:vigenere密码[字符]2:国王游戏[贪心][高精度]3:开车旅行[倍增][set] 题目: VJ P1778 vigenere密码 Accepted 标签:NOIP提高组2012 ...
- RM报表的打印偏移
自己摸索一下 RMReport1.SaveReportOptions.AutoLoadSaveSetting := True; RMReport1.SaveReportOptions.UseRegis ...
- IT公司100题-18-圆圈中最后剩下的数字
问题描述: n个数字(下标为0, 1, …, n-1)形成一个圆圈,从数字0开始,每次从这个圆圈中删除第m个数字(当前数字从1开始计数).当一个数字被删除后,从被删除数字的下一个数字开始计数,继续删除 ...