# No input file specified

**URL:** <https://www.ruby-forum.com/t/no-input-file-specified/221758>\
**Category:** NGINX\
**Created:** [July 29, 2012, 8:39am UTC](https://www.ruby-forum.com/t/no-input-file-specified/221758 "2012-07-29T08:39:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [July 29, 2012, 8:39am UTC](https://www.ruby-forum.com/t/no-input-file-specified/221758/1 "2012-07-29T08:39:43Z")

</div>

Hi,

I deploy the application using Capistrano to /var/nginx/www/myapp. The  
current code is always at /var/nginx/www/myapp/current.

So I changes the server’s root folder to /var/nginx/www/myapp/current  
hoping that the location specs would be raktive to this folder. Since  
then I get the “No input file specified.” error.

I also have fastcgi\_param SCRIPT\_FILENAME  
$document\_root$fastcgi\_script\_name;

What might be wrong?

Thanks,  
Yash

---

<div class="post-metadata">

**Author:** ![Yash\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/7ab992/32.png) [@Yash\_G](https://www.ruby-forum.com/u/Yash_G)\
**Post date:** [July 29, 2012, 12:10pm UTC](https://www.ruby-forum.com/t/no-input-file-specified/221758/2 "2012-07-29T12:10:37Z")

</div>

Are you using Capistrano with PHP?  
No input file specified usually if there is no running PHP there.

Regards,  
Joe

---

<div class="post-metadata">

**Author:** ![Yash\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/7ab992/32.png) [@Yash\_G](https://www.ruby-forum.com/u/Yash_G)\
**Post date:** [July 30, 2012, 7:46am UTC](https://www.ruby-forum.com/t/no-input-file-specified/221758/3 "2012-07-30T07:46:40Z")

</div>

When I access [http://localhost:82/index.php](http://localhost:82/index.php)  
I get “No input file specified.”

I have php running using:  
php-cgi -b 127.0.0.1:9000

My conf file is:  
server {  
listen 82 default;  
## SSL directives might go here

```
server_name localhost 127.0.0.1 *;

    root /cygdrive/e/xampp/htdocs/getit/src/myapp;
error_log /cygdrive/e/nginx.error.log notice;
access_log /cygdrive/e/nginx.access.log ;

rewrite_log on;

    location / {
        index index.html index.php; ## Allow a static html file to

```

be shown first  
try\_files $uri $uri/ @magehandler; ## If missing pass the  
URI to Magento’s front handler  
}

```
    ## These locations would be hidden by .htaccess normally
    location ^~ /app/ { deny all; }
    location ^~ /includes/ { deny all; }
    location ^~ /lib/ { deny all; }
    location ^~ /media/downloadable/ { deny all; }
    location ^~ /pkginfo/ { deny all; }
    location ^~ /report/config.xml { deny all; }
    location ^~ /var/ { deny all; }

    location ^~ /. { ## Disable .htaccess and other hidden files
        return 404;
    }

#Any request that does not match the regex locations below is sent

```

here  
location @handler { ## Magento uses a common front handler

```
        rewrite / /index.php$1 last;
    }
    location @magehandler { ## Magento uses a common front handler

        rewrite (.*) /index.php$1 last;
    }

#The more-specific regex are at the top.
#The regex's are evaluated in the order in which they appear.
    location ~ .php.*$ { ## Execute PHP scripts

     proxy_read_timeout 120;
  proxy_connect_timeout 120;
        expires off; ## Do not cache dynamic content
        fastcgi_pass 127.0.0.1:9000;
        #fastcgi_param HTTPS $fastcgi_https;

  fastcgi_param SCRIPT_FILENAME 

```

$document\_root$fastcgi\_script\_name;  
fastcgi\_param MAGE\_RUN\_CODE default; ## Store code is  
defined in administration \> Configuration \> Manage Stores  
fastcgi\_param MAGE\_RUN\_TYPE store;  
include fastcgi\_params; ## See  
/etc/nginx/fastcgi\_params  
}  
location ~ /(media|skin|js)/ { }  
location ~ /(tag|admin|customer|wishlist|checkout|catalog|app)._$ {  
 #store URL  
rewrite /(._)$ /index.php/$1 last;  
}  
location ~ /[a-zA-Z]+$ { #store URL  
rewrite ^/([a-zA-Z]+) ?store=$1 last;  
}  
location ~ /[a-zA-Z]+/ { #store URL  
rewrite ^/([a-zA-Z]+)(.\*) $2?store=$1 last;  
}  
}

Posted at Nginx Forum:

> **[Re: No input file specified](https://forum.nginx.org/read.php?2,229066,229086#msg-229086)**
>
> Hi, I deploy the application using Capistrano to /var/nginx/www/myapp. The current code is always at /var/nginx/www/myapp/current. So I changes the server's root folder to /var/nginx/www/myapp/current hoping that the location specs would be raktive...

---

<div class="post-metadata">

**Author:** ![Yash\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/7ab992/32.png) [@Yash\_G](https://www.ruby-forum.com/u/Yash_G)\
**Post date:** [July 31, 2012, 7:53pm UTC](https://www.ruby-forum.com/t/no-input-file-specified/221758/4 "2012-07-31T19:53:24Z")

</div>

On Mon, Jul 30, 2012 at 01:46:19AM -0400, yashgt wrote:

Hi there,

> When I access [http://localhost:82/index.php](http://localhost:82/index.php)  
> I get “No input file specified.”

That message (usually) comes from the fastcgi server, and (usually)  
means that the SCRIPT\_FILENAME that was sent was not found by that  
server.

From your configuration, it looks like that for this request,  
SCRIPT\_FILENAME is  
/cygdrive/e/xampp/htdocs/getit/src/myapp/index.php .

Does that filename exist, from the point of view of the fastcgi server?

(The “/cygdrive/” bit suggests that cygwin is involved somehow. Is  
php running under cygwin? Does it have the same view of the filesystem  
as nginx?)

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
