desbouis / nginx-redis-proxy

Nginx as reverse proxy using redis as cache engine
105 stars 29 forks source link

Lua code outside conf #2

Closed desbouis closed 12 years ago

desbouis commented 12 years ago

Just put the lua script outside the nginx conf.

desbouis commented 12 years ago

It seems that when a "location" bloc in the nginx conf is too big, I have this error when I reload nginx :

nginx: [emerg] too long parameter, probably missing terminating "'" character in /opt/nginx/conf/sites-enabled/proxy-redis.conf:57

At the line 57, the lua code is beginning with the "content_by_lua" directive Then, I will put the lua code in a lua file and I will call it with "content_by_lua_file" directive.