免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6308 | 回复: 7
打印 上一主题 下一主题

nginx 启动报错! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-04-28 09:35 |只看该作者 |倒序浏览
本帖最后由 luxinjun888 于 2011-04-28 09:46 编辑

问题描述:
[root@localhost sbin]# ./nginx
[emerg]: the using of the regex "\.php$" requires PCRE library in /usr/local/nginx//conf/nginx.conf:65

配置文件:

  server
  {
    listen       80;
    server_name 1.hg.com ;
    index index.html index.htm index.php;
    root  /data0/htdocs/blog;

    #limit_conn   crawler  20;

   location ~ \.php$
    {
      #fastcgi_pass  unix:/tmp/php-cgi.sock;
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index index.php;
      include fcgi.conf;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
      expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
      expires      1h;
    }

    log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
              '$status $body_bytes_sent "$http_referer" '
              '"$http_user_agent" $http_x_forwarded_for';
    access_log  /data1/logs/access.log  access;
      }

pcre已经YUM安装过:
[root@localhost sbin]# rpm -qa | grep pcre
pcre-6.6-6.el5_6.1
pcre-devel-6.6-6.el5_6.1

请教下大家这个问题怎么解决一下,谢谢

论坛徽章:
0
2 [报告]
发表于 2011-04-28 09:44 |只看该作者
:wink:路过的,纯支持一下。

论坛徽章:
0
3 [报告]
发表于 2011-04-28 09:48 |只看该作者
回复 1# luxinjun888


   安装nginx        with-pcre   指定过没具体路径?

论坛徽章:
0
4 [报告]
发表于 2011-04-28 09:51 |只看该作者
回复 1# luxinjun888


    可以的话 你重新编译    with-pcre=pcre源码的目录路径   试试

论坛徽章:
0
5 [报告]
发表于 2011-04-28 09:53 |只看该作者
pcre 这个插件没安装吧!  你是yum安装,还是tar编译安装!

论坛徽章:
0
6 [报告]
发表于 2011-04-28 10:02 |只看该作者
本帖最后由 luxinjun888 于 2011-04-28 10:03 编辑

yum安装的,用Tar也安装过,但是tar 安装是在出问题之后,NGINX编译的时候还没带这个参数,我现在是看能否在YUM安装的基础上解决这个问题,不行就重新编译nginx带with-pcre=pcre 看下了 谢谢大家

[root@localhost log]# rpm -qa | grep pcre
pcre-6.6-6.el5_6.1
pcre-devel-6.6-6.el5_6.1
这个是安装过的

论坛徽章:
0
7 [报告]
发表于 2011-04-28 10:12 |只看该作者
回复 6# luxinjun888


    with-pcre=pcre.....   它接的是源码目录的位置  不是安装后的位置  所以建议源码编译上

论坛徽章:
0
8 [报告]
发表于 2011-04-28 10:26 |只看该作者
本帖最后由 luxinjun888 于 2011-04-28 16:15 编辑

好的,非常感谢! 重新编译解决了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP