Nginx http module putting config in NGX_MAIN_CONF

vivek goel goelvivek2011 at gmail.com
Tue Mar 20 11:53:47 UTC 2012


hi,
I want to put variable inside nginx NGX_MAIN_CONF

I want written code like this

 { ngx_string("mydata"),
   NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
   ngx_conf_set_str_slot,
   0,
   offsetof(ngx_http_my_main_conf_t, my_data),
   NULL },


But when I put in in configuration file
worker_processes  2;
mydata "a";

I am getting following error
nginx: [emerg] unknown directive "mydata"

How to fix this ?


regards
Vivek Goel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120320/b1e7796b/attachment.html>


More information about the nginx-devel mailing list