# Where are variables defined?

**URL:** <https://www.ruby-forum.com/t/where-are-variables-defined/177758>\
**Category:** NGINX\
**Created:** [October 23, 2009, 7:03am UTC](https://www.ruby-forum.com/t/where-are-variables-defined/177758 "2009-10-23T07:03:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boern](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Boern](https://www.ruby-forum.com/u/Boern)\
**Post date:** [October 23, 2009, 7:03am UTC](https://www.ruby-forum.com/t/where-are-variables-defined/177758/1 "2009-10-23T07:03:57Z")

</div>

## Hi,all: I am newbie for nginx,and I have read the nginx English site article about modules and configure,but I have a question that there are lots of variables used in nginx.conf and I cann`t find where that`s defined ,like this:

fastcgi\_param QUERY\_STRING $query\_string;  
fastcgi\_param REQUEST\_METHOD $request\_method;  
fastcgi\_param CONTENT\_TYPE $content\_type;  
fastcgi\_param CONTENT\_LENGTH $content\_length;

fastcgi\_param SCRIPT\_NAME $fastcgi\_script\_name;  
fastcgi\_param REQUEST\_URI $request\_uri;  
fastcgi\_param DOCUMENT\_URI $document\_uri;  
fastcgi\_param DOCUMENT\_ROOT $document\_root;  
fastcgi\_param SERVER\_PROTOCOL $server\_protocol;

fastcgi\_param GATEWAY\_INTERFACE CGI/1.1;  
fastcgi\_param SERVER\_SOFTWARE nginx/$nginx\_version;

fastcgi\_param REMOTE\_ADDR $remote\_addr;  
fastcgi\_param REMOTE\_PORT $remote\_port;  
fastcgi\_param SERVER\_ADDR $server\_addr;  
fastcgi\_param SERVER\_PORT $server\_port;  
fastcgi\_param SERVER\_NAME $server\_name;

---

<div class="post-metadata">

**Author:** ![Boern](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Boern](https://www.ruby-forum.com/u/Boern)\
**Post date:** [October 23, 2009, 7:25am UTC](https://www.ruby-forum.com/t/where-are-variables-defined/177758/2 "2009-10-23T07:25:02Z")

</div>

these variable value generated automatically when client make a  
request… i guess… ^^ so… don’t change it…

---

<div class="post-metadata">

**Author:** ![Boern](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Boern](https://www.ruby-forum.com/u/Boern)\
**Post date:** [October 23, 2009, 9:08am UTC](https://www.ruby-forum.com/t/where-are-variables-defined/177758/3 "2009-10-23T09:08:38Z")

</div>

Hello!

On Fri, Oct 23, 2009 at 12:56:00PM +0800, Boern wrote:

> Hi,all:  
> I am newbie for nginx,and I have read the nginx English site article  
> about modules and configure,but I have a question that there are lots  
> of variables used in nginx.conf and I cann`t find where that`s  
> defined ,like this:

Variables are defined by modules, and usually documented as a  
separate section in module documentation.

> * * *
> 
> fastcgi\_param QUERY\_STRING $query\_string;  
> fastcgi\_param REQUEST\_METHOD $request\_method;  
> fastcgi\_param CONTENT\_TYPE $content\_type;  
> fastcgi\_param CONTENT\_LENGTH $content\_length;

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

> fastcgi\_param SCRIPT\_NAME $fastcgi\_script\_name;

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

> fastcgi\_param REQUEST\_URI $request\_uri;  
> fastcgi\_param DOCUMENT\_URI $document\_uri;  
> fastcgi\_param DOCUMENT\_ROOT $document\_root;  
> fastcgi\_param SERVER\_PROTOCOL $server\_protocol;

Again,

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

> fastcgi\_param GATEWAY\_INTERFACE CGI/1.1;  
> fastcgi\_param SERVER\_SOFTWARE nginx/$nginx\_version;

Defined by ngx\_http\_core\_module, but not really documented.

> fastcgi\_param REMOTE\_ADDR $remote\_addr;  
> fastcgi\_param REMOTE\_PORT $remote\_port;  
> fastcgi\_param SERVER\_ADDR $server\_addr;  
> fastcgi\_param SERVER\_PORT $server\_port;  
> fastcgi\_param SERVER\_NAME $server\_name;

Again,

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

> * * *
> 
> so,andbody can explain that? maybe the offical site needs has a  
> complete document !

You mean something like [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/NginxDirectiveIndex),  
but for variables? May be it make sence. Feel free to build one.  
🙂

Maxim D.
