# FastCGI Param

**URL:** <https://www.ruby-forum.com/t/fastcgi-param/179651>\
**Category:** NGINX\
**Created:** [December 1, 2009, 9:38am UTC](https://www.ruby-forum.com/t/fastcgi-param/179651 "2009-12-01T09:38:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nt001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/53a042/32.png) [@nt001](https://www.ruby-forum.com/u/nt001)\
**Post date:** [December 1, 2009, 9:38am UTC](https://www.ruby-forum.com/t/fastcgi-param/179651/1 "2009-12-01T09:38:19Z")

</div>

Hi there, I have problem, but I sloved 50% of it. Need a little help. So  
my problem before is when I try to load php pages, nginx got “No input  
file specified.” So I have sloved this by looking at fastcgi\_param. …  
my www dir is /www  
pages dir is /www/page1, /www/page2, /www/page3  
my fastcgi parameters in nginx.conf is:

```
    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /www$fastcgi_script_name;
        include /usr/pkg/etc/nginx/fastcgi_params;
    }

```

and have still recived “No input file specified.” when I use

fastcgi\_param SCRIPT\_FILENAME /www$fastcgi\_script\_name;

but when i type the site1, 2 or 3 folder, don’t have problems …  
something like:

fastcgi\_param SCRIPT\_FILENAME /www/site1/$fastcgi\_script\_name; (or  
/www/site1$fastcgi\_script\_name; # will be the same)

Sooo my question, example I hosting about more than 100 web pages, this  
mean I have 100+ folders in /www dir. Are I must need to write 100 lines  
for fastcgi workin’ for all?

By the way I have tired to try

fastcgi\_param SCRIPT\_FILENAME /www/_/$fastcgi\_script\_name;  
fastcgi\_param SCRIPT\_FILENAME /www/_$fastcgi\_script\_name;  
fastcgi\_param SCRIPT\_FILENAME /www/$\*$fastcgi\_script\_name;

to enable fastcgi for all pages, but still don’t work (No imput file)

Can somebody help:?

Thanks beforely!

Posted at Nginx Forum:

> **[FastCGI Param](https://forum.nginx.org/read.php?2,26966,26966#msg-26966)**
>
> Hi there, I have problem, but I sloved 50% of it. Need a little help. So my problem before is when I try to load php pages, nginx got "No input file specified." So I have sloved this by looking at fastcgi\_param. ... my www dir is /www pages...

---

<div class="post-metadata">

**Author:** ![nt001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/53a042/32.png) [@nt001](https://www.ruby-forum.com/u/nt001)\
**Post date:** [December 1, 2009, 12:19pm UTC](https://www.ruby-forum.com/t/fastcgi-param/179651/2 "2009-12-01T12:19:51Z")

</div>

FastCGI don’t work for virtual hosts only. But if I load  
[http://MyIpAdress/site1/](http://MyIpAdress/site1/) the page is load successful. Please for  
solution.

Posted at Nginx Forum:

> **[Re: FastCGI Param](https://forum.nginx.org/read.php?2,26966,27005#msg-27005)**
>
> Hi there, I have problem, but I sloved 50% of it. Need a little help. So my problem before is when I try to load php pages, nginx got "No input file specified." So I have sloved this by looking at fastcgi\_param. ... my www dir is /www pages...

---

<div class="post-metadata">

**Author:** ![nt001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/53a042/32.png) [@nt001](https://www.ruby-forum.com/u/nt001)\
**Post date:** [December 2, 2009, 7:42am UTC](https://www.ruby-forum.com/t/fastcgi-param/179651/3 "2009-12-02T07:42:46Z")

</div>

Igor, thank you for atention, but still "No input file specified. "

ps. I forgot to told you, I have allready try this option with  
$document\_root.  
Cheers, spasiba.

Posted at Nginx Forum:

> **[Re: FastCGI Param](https://forum.nginx.org/read.php?2,26966,27290#msg-27290)**
>
> Hi there, I have problem, but I sloved 50% of it. Need a little help. So my problem before is when I try to load php pages, nginx got "No input file specified." So I have sloved this by looking at fastcgi\_param. ... my www dir is /www pages...

---

<div class="post-metadata">

**Author:** ![nt001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/53a042/32.png) [@nt001](https://www.ruby-forum.com/u/nt001)\
**Post date:** [December 5, 2009, 12:44am UTC](https://www.ruby-forum.com/t/fastcgi-param/179651/4 "2009-12-05T00:44:23Z")

</div>

## Igor S. Wrote:

> > my fastcgi parameters in nginx.conf is:  
> > and have still recived "No input file  
> > /www/site1/$fastcgi\_script\_name; (or
> 
> ## You probably need
> 
> Igor S.  
> [Igor Sysoev](http://sysoev.ru/en/)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

So, I see the FastCGI and PHP work only for root domain, not for vhosts.  
Aybody have solution:?

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,26966,27890#msg-27890](http://forum.nginx.org/read.php?2,26966,27890#msg-27890)

---

<div class="post-metadata">

**Author:** ![nt001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/53a042/32.png) [@nt001](https://www.ruby-forum.com/u/nt001)\
**Post date:** [December 19, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/fastcgi-param/179651/5 "2009-12-19T15:25:26Z")

</div>

On Tue, Dec 01, 2009 at 03:34:00AM -0500, nt001 wrote:

> ```
> }
> 
> ```
> 
> Sooo my question, example I hosting about more than 100 web pages, this mean I have 100+ folders in /www dir. Are I must need to write 100 lines for fastcgi workin’ for all?
> 
> By the way I have tired to try
> 
> fastcgi\_param SCRIPT\_FILENAME /www/_/$fastcgi\_script\_name;  
> fastcgi\_param SCRIPT\_FILENAME /www/_$fastcgi\_script\_name;  
> fastcgi\_param SCRIPT\_FILENAME /www/$\*$fastcgi\_script\_name;
> 
> to enable fastcgi for all pages, but still don’t work (No imput file)

You probably need

```
 location ~ \.php$ {
     fastcgi_pass 127.0.0.1:9000;
     fastcgi_param SCRIPT_FILENAME 

```

$document\_root$fastcgi\_script\_name;  
include /usr/pkg/etc/nginx/fastcgi\_params;  
}

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**
