nginx php-cgi php
- /***************************************************************************
- * nginx php-cgi php
- * 说明:
- * 由于有需要多个web访问的需求,于是选择使用nginx来做端口映射,刚开始配置
- * 的时候没法先php还有fpm模式,因为交叉编译php的时候只选择cgi,所以配置的过程
- * 中遇到问题,还有就是没注意到要将php-cgi跑起来才行,之前通过busybox httpd是
- * 不需要这么做的,不过目前时间久了php-cgi会挂掉。
- *
- * 2016-9-26 深圳 南山平山村 曾剑锋
- **************************************************************************/
- 一、参考文档:
- . NGINX - No input file specified. - php Fast/CGI
- http://stackoverflow.com/questions/21377321/nginx-no-input-file-specified-php-fast-cgi
- . 解决NGINX PHP "No input file specified"
- http://xiahongyuan.blog.51cto.com/906214/852424
- . Nginx+php-cgi的配置方法介绍
- http://blog.csdn.net/bookmoth/article/details/4568203
- . windows下配置nginx+php环境
- http://www.cnblogs.com/huayangmeng/archive/2011/06/15/2081337.html
- 二、修改nginx php配置:
- server {
- listen ;
- server_name localhost;
- root /var/www/;
- index index.html index.htm index.php;
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
- location ~ \.php$ {
- fastcgi_pass 127.0.0.1:;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
- include fastcgi.conf;
- include fastcgi_params;
- }
- }
- 三、启动php-cgi:
- . php-cgi -b 127.0.0.1: -c /etc/php.ini
- . 开机自启动:
- cat /etc/init.d/S51phpCGI
- echo "Start php-cgi."
- php-cgi -b 127.0.0.1: -c /etc/php.ini &
nginx php-cgi php的更多相关文章
- nginx支持cgi(c,c++)
前段时间用我修改了tinyhttpd,让其cgi支持文件流,感觉满小巧,就应用上了.最近访问请求量上来而来,它对socket的各种异常状态处理不好,对于慢速的链接会占用我的线程.虽然我一直想仿出ten ...
- nginx+c+cgi开发
http://blog.csdn.net/marising/article/details/3932938 1.Nginx 1.1.安装 Nginx 的中文维基 http://wiki.codemon ...
- 结合Nginx以cgi方式安装php5.5.4
新建用户及用户组 groupadd webuser useradd -g webuser webuser 下载php-5.5 下载链接:http://pan.baidu.com/s/1i3CBshv ...
- 【夯实Nginx基础】Nginx工作原理和优化、漏洞
本文地址 原文地址 本文提纲: 1. Nginx的模块与工作原理 2. Nginx的进程模型 3 . NginxFastCGI运行原理 3.1 什么是 FastCGI ...
- Nginx+FastCGI运行原理
Nginx不支持对外部程序的直接调用或者解析,所有的外部程序(包括PHP)必须通过FastCGI接口来调用.FastCGI接口在Linux下是socket(这个socket可以是文件socket,也可 ...
- Nginx中FastCGI配置优化
FastCGI: FastCGI是从CGI发展改进而来的.传统CGI接口方式的主要缺点是性能很差,因为每次HTTP服务器遇到动态程序时都需要重新启动脚本解析器来执行解析,然后结果被返回给HTTP服务器 ...
- nginx、fastCGI、php-fpm关系梳理(转)
前言: Linux下搭建nginx+php+memached(LPMN)的时候,nginx.conf中配需要配置fastCGI,php需要安装php-fpm扩展并启动php-fpm守护进程,nginx ...
- Nginx+php+fastcgi在win7下的配置
首先装载php 1.从www.php.net上下载php对应版本 2.解压之后放到c盘下(其实放哪无所谓,Apache会有配置指向,但是Nginx不用) 3.因为用的5.3.17版本,已经有了php- ...
- 实战Nginx与PHP(FastCGI)的安装、配置与优化
一.什么是 FastCGIFastCGI是一个可伸缩地.高速地在HTTP server和动态脚本语言间通信的接口.多数流行的HTTP server都支持FastCGI,包括Apache.Nginx和l ...
- centos+nginx从零开始配置负载均衡
nginx负载均衡的理解 nginx是一个轻量级的.高性能的webserver,他主要可以干下面两件事: 作为http服务器(和apache的效果一样) 作为反向代理服务器实现负载均衡 现在nginx ...
随机推荐
- IKAnalyzer 和 solr4.3 冲突
solr4.3 运行之后发现异常:Exception in thread "main" java.lang.VerifyError: class org.wltea.analyze ...
- Eclipse中SVN的安装步骤(两种)和使用方法 [转]
一.给Eclipse安装SVN,最常见的有两种方式:手动方式和使用安装向导方式.具体步骤如下: 方式一:手动安装 1.从官网下载site-1.6.9.zip文件,网址是:subclipse.tigri ...
- case when的用法
国家(country)人口(population) 中国600 美国100 加拿大100 英国200 ...
- java 面向对象编程--第十章 接口
1. 接口可以看做是抽象类的特例.抽象类中可以定义抽象方法,也可以定义具体方法.但接口只能定义抽象方法.所有接口可以看作行为的抽象.定义接口使用关键字interface,实现接口使用关键字imple ...
- CSU1022
题目: blue和AutoGerk是好朋友.他们的相同点是都喜欢研究算法,不同点是AutoGerk已是大牛而blue还是菜鸟.blue经常拿一些自以为很难的问题去问AutoGerk,想难倒他,但是每次 ...
- Program E-- CodeForces 18C
Description Once Bob took a paper stripe of n squares (the height of the stripe is 1 square). In eac ...
- Tasklist and TaskKill
C:\Users\Administrator>tasklist /? TASKLIST [/S system [/U username [/P [password]]]] [/M ...
- 从协议VersionedProtocol开始1
Phase 0: Make a plan You must first decide what steps you're going to have in your process. It sound ...
- Asp.net项目因Session阻塞导致页面打开速度变慢
发现罪魁祸首是Session阻塞造成的.默认情况下session状态是“可写状态”(EnableSessionState=”true”),即当用户打开任何一个页面时,该页面的Session就会持有一个 ...
- a Makefile
obj-m += showpid.o obj-m += ps.o all: make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) mo ...