# Use directive value inside nginx.conf

**URL:** <https://www.ruby-forum.com/t/use-directive-value-inside-nginx-conf/245902>\
**Category:** NGINX\
**Created:** [July 25, 2013, 10:42am UTC](https://www.ruby-forum.com/t/use-directive-value-inside-nginx-conf/245902 "2013-07-25T10:42:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [July 25, 2013, 10:42am UTC](https://www.ruby-forum.com/t/use-directive-value-inside-nginx-conf/245902/1 "2013-07-25T10:42:28Z")

</div>

Hi!

I need to send to my application through “fastcgi\_param” the value of  
“client\_max\_body\_size” directive, which is defined in http block in  
nginx.conf  
Is there any way to do this without moving the declaration of that  
directive  
from http block?

So I have this:

http {  
…  
client\_max\_body\_size 5m;  
…  
}

And need this:

server {  
…  
location xxx {  
fastcgi\_param SOME\_NAME ;  
}  
…  
}

Thanks!

Posted at Nginx Forum:

> **[Use directive value inside nginx.conf](https://forum.nginx.org/read.php?2,241221,241221#msg-241221)**
>
> Hi! I need to send to my application through "fastcgi\_param" the value of "client\_max\_body\_size" directive, which is defined in http block in nginx.conf Is there any way to do this without moving the declaration of that directive...
