Chinaunix

标题: nginx 启动报错! [打印本页]

作者: luxinjun888    时间: 2011-04-28 09:35
标题: nginx 启动报错!
本帖最后由 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

请教下大家这个问题怎么解决一下,谢谢
作者: axiaowuua    时间: 2011-04-28 09:44
:wink:路过的,纯支持一下。
作者: taojie2000    时间: 2011-04-28 09:48
回复 1# luxinjun888


   安装nginx        with-pcre   指定过没具体路径?
作者: taojie2000    时间: 2011-04-28 09:51
回复 1# luxinjun888


    可以的话 你重新编译    with-pcre=pcre源码的目录路径   试试
作者: loveradmin    时间: 2011-04-28 09:53
pcre 这个插件没安装吧!  你是yum安装,还是tar编译安装!
作者: luxinjun888    时间: 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
这个是安装过的
作者: taojie2000    时间: 2011-04-28 10:12
回复 6# luxinjun888


    with-pcre=pcre.....   它接的是源码目录的位置  不是安装后的位置  所以建议源码编译上
作者: luxinjun888    时间: 2011-04-28 10:26
本帖最后由 luxinjun888 于 2011-04-28 16:15 编辑

好的,非常感谢! 重新编译解决了




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2