pcre_compile() failed: unrecognized character after (?<

Peter Leonov gojpeg at gmail.com
Fri Dec 11 16:40:05 MSK 2009


IMHO, this is a pcre version issue. Old versions do not support named  
selections.

Could you please try to update your system pcre library or just  
compile the latest lib version in nginx using --with-pcre=/path/to/ 
custom/pcre


On 11.12.2009, at 16:10, Phillip Oldham <phill at activityhq.com> wrote:

> server {
>   server_name   ~^test\.(?<domain>.+)$;
>
>   location / {
>       root  /sites/$domain;
>   }
> }
>
> # nginx -t
> [emerg]: pcre_compile() failed: unrecognized character after (?< in  
> "^test\.(?<domain>.+)$" at "domain>.+)$" in /etc/nginx/vhosts/ 
> testdomain:11
> configuration file /etc/nginx/nginx.conf test failed
> # nginx -V
> nginx version: nginx/0.8.29
> built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
> TLS SNI support disabled
> configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx  
> --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/ 
> error.log --pid-path=/var/run/nginx.pid --with-rtsig_module --with- 
> select_module --with-poll_module --with-http_ssl_module --with- 
> http_stub_status_module --with-http_gzip_static_module --with- 
> http_dav_module --with-http_flv_module --with-http_xslt_module -- 
> with-http_random_index_module --with-http_image_filter_module --http- 
> log-path=/var/log/nginx/access.log --with-md5=/usr/lib --with-sha1=/ 
> usr/lib --with-http_perl_module
>
> Can't tell what I'm doing wrong. Advice please?
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list