# Pcre

**URL:** <https://www.ruby-forum.com/t/pcre/242403>\
**Category:** NGINX\
**Created:** [June 22, 2015, 12:34pm UTC](https://www.ruby-forum.com/t/pcre/242403 "2015-06-22T12:34:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [June 22, 2015, 12:34pm UTC](https://www.ruby-forum.com/t/pcre/242403/1 "2015-06-22T12:34:23Z")

</div>

Hi Experts,

I am working on NGINX-1.6.3 version. Installation is successful using  
latest  
pcre, pcre-devel packages too…

While accessing the service, static contents were not loaded.  
As suggested in google, I tried configuring as below where the static  
contents are available @  
“[http://livetests123/livetest/WEB-INF/classes/static/](http://livetests123/livetest/WEB-INF/classes/static/)”

```
server {
   listen 80;
   server_name livetest.corp.com;

   location ~"*\.(js|jpg|png|css)$" {
      root http://livetests123/livetest/;
      expires 30d;
   }

   location /{
      proxy_pass http://livetest123/livetest/login/;
   }
}

```

On the first step while starting Nginx, I could see below message about  
PCRE  
nginx: [emerg] using regex “”\*.(js|jpg|png|css)$“” requires PCRE  
library

I have confirmed again with yum install PCRE that the “latest version is  
already installed and nothing to do” message in return.

Pls. assist for the below queries:

(1) How to fix the issue - nginx: [emerg] using regex  
“”\*.(js|jpg|png|css)$“” requires PCRE library  
(2) Post which, how to configure in achievint static content available @  
“[http://livetests123/livetest/WEB-INF/classes/static/](http://livetests123/livetest/WEB-INF/classes/static/)”?

Best regards,  
Maddy

Posted at Nginx Forum:

> **[PCRE](https://forum.nginx.org/read.php?2,259783,259783#msg-259783)**
>
> Hi Experts, I am working on NGINX-1.6.3 version. Installation is successful using latest pcre, pcre-devel packages too.. While accessing the service, static contents were not loaded. As suggested in google, I tried configuring as below where the...

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [June 22, 2015, 1:10pm UTC](https://www.ruby-forum.com/t/pcre/242403/2 "2015-06-22T13:10:01Z")

</div>

Hello!

On Mon, Jun 22, 2015 at 06:33:58AM -0400, smsmaddy1981 wrote:

> ```
> server {
> listen 80;
> server_name livetest.corp.com;
> 
> location ~"*\.(js|jpg|png|css)$" {
> root http://livetests123/livetest/;
> 
> ```

The “root” directive is to configure filesystem paths. If you  
want nginx to proxy requests to another URL, you have to use  
proxy\_pass. See details at [Module ngx\_http\_proxy\_module](http://nginx.org/r/proxy_pass).

> nginx: [emerg] using regex “”\*.(js|jpg|png|css)$“” requires PCRE library  
> The error message suggests that your nginx binary was compiled  
> without the PCRE library. You have to recompile nginx if you want  
> it to support regexes.

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [June 23, 2015, 1:01am UTC](https://www.ruby-forum.com/t/pcre/242403/3 "2015-06-23T01:01:35Z")

</div>

I have installed 1.8.0 and configure is successful and no PCRE  
exceptions  
are thrown now.

But, I face issues in loading static content available on different  
servers.  
How to achieve this, pls. suggest?

Posted at Nginx Forum:

> **[Re: PCRE](https://forum.nginx.org/read.php?2,259783,259795#msg-259795)**
>
> Hi Experts, I am working on NGINX-1.6.3 version. Installation is successful using latest pcre, pcre-devel packages too.. While accessing the service, static contents were not loaded. As suggested in google, I tried configuring as below where the...
