1.the HTTP rewrite module requires the PCRE library.

./configure: error: the HTTP rewrite module requires the PCRE library.

You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

安装pcre-devel:

  yum -y install pcre-devel


./configure: error: C compiler cc is not found
yum -y install gcc gcc-c++ autoconf automake make  

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.

yum install -y zlib-devel


 ./nginx -s reload
nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:

yum install openssl 
yum install openssl-devel


nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:6

首先确保机器上安装了openssl和openssl-devel

#yum install openssl
#yum install openssl-devel

然后就是自己颁发证书给自己

#cd /usr/local/nginx/conf
#openssl genrsa -des3 -out server.key 1024
#openssl req -new -key server.key -out server.csr
#openssl rsa -in server.key -out server_nopwd.key
#openssl x509 -req -days 365 -in server.csr -signkey server_nopwd.key -out server.crt

至此证书已经生成完毕,下面就是配置nginx

server {
    listen 443;
    ssl on;
    ssl_certificate  /usr/local/nginx/conf/server.crt;
    ssl_certificate_key  /usr/local/nginx/conf/server_nopwd.key;
}

然后重启nginx即可。

ps: 如果出现“[emerg] 10464#0: unknown directive “ssl” in /usr/local/nginx-0.6.32/conf/nginx.conf:74”则说明没有将ssl模块编译进nginx,在configure的时候加上“–with-http_ssl_module”


检查成功:  

Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using system zlib library nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

编译并安装:

sudo make
sudo make install

nginx configure 错误记录的更多相关文章

  1. nginx 502错误

    一些运行在Nginx上的网站有时候会出现“502 Bad Gateway”错误,有些时候甚至频繁的出现.以下是小编搜集整理的一些Nginx 502错误的排查方法,供参考: Nginx 502错误的原因 ...

  2. [Python Web]配置 nginx 遇到错误排查(初级)

    配置 nginx 遇到错误排查(初级) 系统版本:ubuntu 14.04,nginx 版本:nginx/1.4.6 (Ubuntu) 本文不是一步步搭建 nginx 的过程,而是我在使用 nginx ...

  3. [日常] nginx的错误日志error_log设置

    nginx error_log设置1.error_log syslog:server=192.168.1.1 [级别] //直接发送给远程syslog日志集中服务器2.error_log stderr ...

  4. NGINX 502错误排查(转)

    一.NGINX 502错误排查 NGINX 502 Bad Gateway错误是FastCGI有问题,造成NGINX 502错误的可能性比较多.将网上找到的一些和502 Bad Gateway错误有关 ...

  5. Nginx常见错误与问题之解决方法技术指南

      Nginx常见错误与问题之解决方法技术指南. 安装环境: 系统环境:redhat enterprise 6.5 64bit 1.Nginx 常见启动错误 有的时候初次安装nginx的时候会报这样的 ...

  6. Nginx 改变错误日志打印级别

    Nginx 改变错误日志打印级别 user  root;worker_processes  2; worker_rlimit_nofile 10240;error_log logs/nginx_err ...

  7. uploadify插件Http Error(302)错误记录(MVC)

    由于项目(asp.net MVC)需要做一个附件上传的功能,使用的是jQuery的Uploadify插件的2.1.0版本,上传文件到自己项目指定的文件夹下面.做完之后,在谷歌上测试是正确的,在火狐上报 ...

  8. Nginx 502错误触发条件与解决办法汇总(转载)

    一些运行在Nginx上的网站有时候会出现“502 Bad Gateway”错误,有些时候甚至频繁的出现.有些站长是在刚刚转移到Nginx之后就出现了这个问题,所以经常会怀疑这是不是Nginx的问题,但 ...

  9. 开发错误记录8:Unable to instantiate application com

    开发错误记录8:Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication 这是因为在And ...

随机推荐

  1. Python常见数据类型及操作

    基础数据类型 什么是数据类型? 我们人类可以很容易的分清数字与字符的区别,但计算机并不能,计算机虽然很强大,但从某种角度上看又很傻,除非你明确的告诉它,1是数字,“汉”是文字,否则它是分不清1和‘汉’ ...

  2. python-day3-之函数

    不使用函数的情况下只能遵循面向过程的编程,即,根据业务逻辑从上到下实现功能,往往重复的功能,使得代码出现重复. #最简单的函数调用 #由于python遵循从上到下读入内存的规律,所以函数要放到调用的前 ...

  3. PAT——乙级1018

    题目是 1018 锤子剪刀布 (20 point(s)) 大家应该都会玩“锤子剪刀布”的游戏:两人同时给出手势,胜负规则如图所示: 现给出两人的交锋记录,请统计双方的胜.平.负次数,并且给出双方分别出 ...

  4. Linux 基础命令、文档树 和 bash

    最近发现了一个总结得更好的:bash cheatsheet 本文只是我对 linux 基础学习的一个总结,可能仅适用于复习用.算是我的 Linux 备忘录. 最基础 tab 补全 * 通配符 ctrl ...

  5. [oldboy-django][1初识django]阻止默认事件发生 + ajax + 模态编辑对话框

    阻止默认事件发生 a 阻止a标签默认事件发生方法 <a href="http://www.baidu.com" onclick="modalEdit();" ...

  6. [转] linux中 参数命令 -- 和 - 的区别

    在 Linux 的 shell 中,我们把 - 和 -- 加上一个字符(字符串)叫做命令行参数. 主流的有下面几种风格Unix 风格参数 前面加单破折线 -BSD 风格参数 前面不加破折线GNU 风格 ...

  7. web项目中各种路径的获取(复制,为以后好找资源)

    web项目中各种路径的获取 1.可以在servlet的init方法里 String path = getServletContext().getRealPath("/"); 这将获 ...

  8. quagga源码学习--BGP协议对等体连接建立的状态机

    创建完bgp peer之后,就要bgp start了,不然费那么大劲创建出来不做事情就销毁了,就很尴尬了. 那么对等体一旦start起来,就会进入各自的状态,在不同的状态下处理各自的事件消息. 下面列 ...

  9. [tsinsen_A1278]串珠子

    [tsinsen_A1278]串珠子 试题描述 铭铭有 \(n\) 个十分漂亮的珠子和若干根颜色不同的绳子.现在铭铭想用绳子把所有的珠子连接成一个整体. 现在已知所有珠子互不相同,用整数 \(1\) ...

  10. 【tmux】常用命令

    https://www.cnblogs.com/lizhang4/p/7325086.html 复制 prefix [ + vim风格选择复制 新建session tmux new -s name 为 ...