# Trying to understand fastcgi

**URL:** <https://www.ruby-forum.com/t/trying-to-understand-fastcgi/238193>\
**Category:** NGINX\
**Created:** [December 22, 2013, 6:14pm UTC](https://www.ruby-forum.com/t/trying-to-understand-fastcgi/238193 "2013-12-22T18:14:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [December 22, 2013, 6:14pm UTC](https://www.ruby-forum.com/t/trying-to-understand-fastcgi/238193/1 "2013-12-22T18:14:04Z")

</div>

I was trying to understand the fastcgi forwarding. The example shows:

server {  
server\_name .website.com;  
listen 80;  
root /home/website/www;  
index index.html;  
location / {  
fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_param SCRIPT\_FILENAME  
$document\_root$fastcgi\_script\_name;  
fastcgi\_param PATH\_INFO $fastcgi\_script\_name;  
include fastcgi\_params;  
}  
}

in SCRIPT\_FILENAME, does $document\_root == root /home/website/www; ?  
and what value is usually stored in (SCRIPT\_NAME)  
$fastcgi\_script\_name? i don’t understand what script SCRIPT\_NAME  
refers to. Am i suppose to set it or does it set itself?

It also says QUERY\_STRING $query\_string; is needed for configuring  
fastcgi. But this example clearly hasn’t used it?

Is the idea to have fastcgi\_param for only the variables i want to  
include? or is this config simply defining them with a value by  
default?
