# HTTP Redis, SSI and error log

**URL:** <https://www.ruby-forum.com/t/http-redis-ssi-and-error-log/202104>\
**Category:** NGINX\
**Created:** [January 21, 2011, 5:55pm UTC](https://www.ruby-forum.com/t/http-redis-ssi-and-error-log/202104 "2011-01-21T17:55:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 21, 2011, 5:55pm UTC](https://www.ruby-forum.com/t/http-redis-ssi-and-error-log/202104/1 "2011-01-21T17:55:01Z")

</div>

Hello,

I am trying to use the http redis module for nginx basically like :

```auto
set $redis_key "$key";
redis_pass redisbackend;
default_type text/html;
error_page 404 502 504 = @fallback;
```

But I have a curious message in error log !?

```auto
2011/01/21 17:45:38 [alert] 25902#0: *125149 unknown variable index: -1,
client: XXX.XXX.XXX.XXX, server: _, request: "GET /myUri/ HTTP/1.1",
subrequest: "/MySubrequest/", host: "Myhost"
```

How to remove it ?

Thanks in advance

Posted at Nginx Forum:

> **[HTTP Redis, SSI and error log](https://forum.nginx.org/read.php?2,168303,168303#msg-168303)**
>
> Hello, I am trying to use the http redis module for nginx basically like : \[code\] set $redis\_key "$key"; redis\_pass redisbackend; default\_type text/html; error\_page 404 502 504 = @fallback; \[/code\] But I have a curio

---

<div class="post-metadata">

**Author:** ![vchav](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/13edae/32.png) [@vchav](https://www.ruby-forum.com/u/vchav)\
**Post date:** [January 21, 2011, 8:19pm UTC](https://www.ruby-forum.com/t/http-redis-ssi-and-error-log/202104/2 "2011-01-21T20:19:26Z")

</div>

Hi,

On Fri, Jan 21, 2011 at 11:54:00AM -0500, vchav wrote:

> I am trying to use the http redis module for nginx basically like :
> 
> [code]  
> set $redis\_key “$key”;

What is the $key?

Examples for ngx\_http\_redis module available in README.

> redis\_pass redisbackend;

Provide more information about redisbackend description.

> How to remove it ?

–  
Sergey A. Osokin  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![vchav](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/13edae/32.png) [@vchav](https://www.ruby-forum.com/u/vchav)\
**Post date:** [January 21, 2011, 9:14pm UTC](https://www.ruby-forum.com/t/http-redis-ssi-and-error-log/202104/3 "2011-01-21T21:14:40Z")

</div>

> What is the $key?  
> set $redis\_key “$http\_host$document\_uri$query\_string”;

> Provide more information about redisbackend  
> description.

upstream redisbackend {  
server 127.0.0.1:6379;  
keepalive 256 single;  
}

Additional information : I’ve removed the line  
static ngx\_str\_t ngx\_http\_redis\_db = ngx\_string(“redis\_db”);

Because of error in compilation.  
./configure … --add-module=../ngx\_http\_redis-0.3.2  
–add-module=../ngx\_http\_upstream\_keepalive-c6396fef9295  
make && make install

Thanks you

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,168303,168377#msg-168377](http://forum.nginx.org/read.php?2,168303,168377#msg-168377)

---

<div class="post-metadata">

**Author:** ![vchav](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/13edae/32.png) [@vchav](https://www.ruby-forum.com/u/vchav)\
**Post date:** [January 22, 2011, 12:27am UTC](https://www.ruby-forum.com/t/http-redis-ssi-and-error-log/202104/4 "2011-01-22T00:27:16Z")

</div>

On Fri, Jan 21, 2011 at 03:13:18PM -0500, vchav wrote:

> > What is the $key?  
> > set $redis\_key “$http\_host$document\_uri$query\_string”;

Does it possible get “$http\_host$document\_uri$query\_string” key-value  
via redis\_cli?  
Could you please provide logs with this key?

> > Provide more information about redisbackend  
> > description.
> 
> upstream redisbackend {  
> server 127.0.0.1:6379;  
> keepalive 256 single;  
> }

keepalive options available only if you are compile nginx with  
ngx\_http\_upstream\_keepalive third-party module.

> Additional information : I’ve removed the line  
> static ngx\_str\_t ngx\_http\_redis\_db = ngx\_string(“redis\_db”);
> 
> Because of error in compilation.  
> ./configure … --add-module=../ngx\_http\_redis-0.3.2  
> –add-module=../ngx\_http\_upstream\_keepalive-c6396fef9295  
> make && make install

What is the platform do you using? You should remove -Wall from  
your CFLAGS, as I told you in private letter.  
Also, I fix compilation problem in future releases.

–  
Sergey A. Osokin  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![vchav](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/13edae/32.png) [@vchav](https://www.ruby-forum.com/u/vchav)\
**Post date:** [January 24, 2011, 9:33am UTC](https://www.ruby-forum.com/t/http-redis-ssi-and-error-log/202104/5 "2011-01-24T09:33:36Z")

</div>

> Does it possible get  
> “$http\_host$document\_uri$query\_string” key-value  
> via redis\_cli?  
> Could you please provide logs with this key?

Yes, it can send the key. Even with your module. It works fine but there  
are alert in errors logs.

> keepalive options available only if you are  
> compile nginx with  
> ngx\_http\_upstream\_keepalive third-party module.

Yes, no problem with that.

> What is the platform do you using? You should  
> remove -Wall from  
> your CFLAGS, as I told you in private letter.  
> Also, I fix compilation problem in future  
> releases.

Debian lenny.  
Thanks

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,168303,169013#msg-169013](http://forum.nginx.org/read.php?2,168303,169013#msg-169013)
