首先贴些遇到的问题,之后再整理

1.yum -y install pcre zlib OpenSSL openssl-devel  pcre-devel

2.

nginx: [emerg] "server" directive is not allowed here in /etc/nginx/nginx.conf:134
#答案:是因为我是用错了配置文件                                                                                     

3.yum whatprovides "*/g++"

  命令解析:该命令为反查命令,此命令的含义是查询g++在哪个安装包里面。
  #gcc-c++
4.yum -y install fcgi fcgi-devel
5.test.c #file

#include "fcgi_stdio.h"
#include <stdlib.h> int main(void)
{
int count = ;
while(FCGI_Accept() >= )
{
printf("Content-type: text/html\r\n"
"\r\n"
"<title>FastCGI Hello!</title>"
"<h1>FastCGI Hello!</h1>"
"Request number %d running on host <i>%s</i>\n",
++count, getenv("SERVER_NAME"));
}
return ;
}

command : spawn-fcgi -a 127.0.0.1 -p 8088 -f cgibin/test2.fcgi

6.nginx.conf 在server 容器中添加

    location ~ \.fcgi$ {
fastcgi_pass 127.0.0.1:;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME fcgi$fastcgi_script_name;
include fastcgi_params;
}

7.重新加载配置文件

kill -HUP `cat logs/nginx.pid`

感谢:http://blog.csdn.net/allenlinrui/article/details/19419721

nginx+fastCGI的更多相关文章

  1. nginx+fastcgi+c/cpp

    参考:http://github.tiankonguse.com/blog/2015/01/19/cgi-nginx-three/ 跟着做了一遍,然后根据记忆写的,不清楚有没错漏步骤,希望多多评论多多 ...

  2. Nginx+FastCGI运行原理

    Nginx不支持对外部程序的直接调用或者解析,所有的外部程序(包括PHP)必须通过FastCGI接口来调用.FastCGI接口在Linux下是socket(这个socket可以是文件socket,也可 ...

  3. 记录一次自己对nginx+fastcgi(fpm)+mysql压力测试结果

    nginx + fastcgi(fpm) 压力测试: CentOS release 5.9 16核12G内存 静态页面: 并发1000,压测200秒,测试结果: 系统最大负载5.47 成功响应: 25 ...

  4. Nginx + FastCGI 程序(C/C++) 搭建高性能web service的Demo及部署发布

       FastCGI编程包括四部分:初始化编码.接收请求循环.响应内容.响应结束循环. FCGX_Request request; FCGX_Init(); ); FCGX_InitRequest(& ...

  5. nginx fastcgi php-fpm的关系梳理

    CGI(Common Gateway Interface)CGI全称是“公共网关接口”(Common Gateway Interface),HTTP服务器与你的或其它机器上的程序进行“交谈”的一种工具 ...

  6. 【入门篇】Nginx + FastCGI 程序(C/C++) 搭建高性能web service的Demo及部署发布

    http://blog.csdn.net/allenlinrui/article/details/19419721 1.介绍     Nginx - 高性能web server,这个不用多说了,大家都 ...

  7. windows下nginx+fastcgi不能使用file_get_contents/curl/fopen的原因

    这两天一直在搞windows下nginx+fastcgi的file_get_contents请求.我想,很多同学都遇到当file_get_contents请求外网的http/https的php文件时毫 ...

  8. [转] nginx+FastCGI+c++

    from: http://www.cnblogs.com/xiaouisme/archive/2012/08/01/2618398.html 一 安装 目的:不需支持php等.就html就行了.步骤: ...

  9. nginx 3.nginx+fastcgi

    死磕nginx 3.nginx+fastcgi 互联网服务器有个非常典型的架构lamp(linux+apache+mysql+php),由于其开源和强大的兼容性而风靡一时,不过随着nginx的横空出世 ...

  10. nginx+fastcgi php 使用file_get_contents、curl、fopen读取localhost本站点.php异常的情况

    原文:http://www.oicto.com/nginx_fastcgi_php_file_get_contents/ 参考:http://os.51cto.com/art/201408/44920 ...

随机推荐

  1. 用Margin还是用Padding?(转载)

    转载出自 海玉的博客 本文地址: http://www.hicss.net/use-margin-or-padding/ 用margin还是用padding这个问题是每个学习CSS进阶时的必经之路. ...

  2. Java_图片切片

    package com.creditease.fetch.credit.util.similarity; import java.awt.image.BufferedImage; import jav ...

  3. ubuntu16.04中supervisor安装与简单使用(转载)

    ubuntu16.04中supervisor安装与简单使用 supervisor 进程管理是可以让进程在后台运行,而不占用控制台影响使用 1. 安装 supervisor sudo apt insta ...

  4. HDFS基础配置

    HADOOP-3.1.0-----HDFS基础配置 执行步骤:(1)配置集群(2)启动.测试集群增.删.查(3)执行wordcount案例 一.配置集群 1.在 hadoop-env.sh配置文件添加 ...

  5. CentOS7 Nginx安装及配置反向代理

    背景: Mono (Mono JIT compiler version 5.4.0.201 ) jexus-5.8.2-x64(<CentOS7 安装 jexus-5.8.2-x64>) ...

  6. C#获取变更过的DataTable记录的实现方法

    本文实例讲述了C#获取变更过的DataTable记录的实现方法,是一个非常实用的功能!具体实现方法如下: 首先DataTable可以看做是一个物理表的内存式存储,每一个DataRow都有一个属性叫做R ...

  7. style样式不换行

    style="white-space:nowrap;"不自动换行<font color="" size=""></font ...

  8. [dev][go] 入门Golang都需要了解什么

    一 什么是Golang 首先要了解Golang是什么. Golang是一门计算机编程语言:可以编译成机器码的像python一样支持各种特性的高级语言. 由Google发明,发明人之一是K,就是C语言的 ...

  9. es6 中的 symbol

    symbol 的引入是为了解决对象中的属性名冲突的问题 使用symbol() 函数生成的变量值不与任何的变量值相等,  所有用改变量的值做属性名是不会冲突的 symbol 可以转化为字符串, 可以转化 ...

  10. spark-sql分组去重总数统计uv

    SparkConf sparkConf = new SparkConf(); sparkConf .setAppName("Internal_Func") .setMaster(& ...