Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a page, I'm not using redirects, just going directly to /invite/index.php?code=f13dc6c9be in the browser and it serves up about 50% of the time.

The rest of the time the browser displays "No input file specified" and the logs show:

2014/02/25 11:21:24 [error] 5231#0: *1 FastCGI sent in stderr: 
  "Unable to open primary script: 
  /var/www/vhosts/app.web/public_html/invite/index.php (No such file or directory)"
  while reading response header from upstream, client: 192.168.0.2, 
  server: app.web, request: "GET /invite/index.php?code=f13dc6c9be HTTP/1.1", 
  upstream: "fastcgi://127.0.0.1:9000", host: "app.web"

I know similar questions have been asked before, and on Stack Overflow as well, but mostly they are all addressing this problem coming up consistently.

The only one that comes close is this: http://stackoverflow.com/questions/7004161/random-no-input-files-specified-in-nginx-and-php-fpm

But that rlimit_files solution doesn't help, and it's on my local development server and I'm the only person hitting the page.

I'm using Ubuntu 12.04 and nginx 1.4.5, and the pages are being served through php-fpm

Any ideas why it would only be working about every other request? I'm just hitting CTRL + R, no POST or GET, no change in URL. Just refreshing, and the error comes and goes.

share|improve this question
    
Have you checked the obvious stuff? The file exists, you can read it, the parent directories exist and are readable as well, your NAS isn't having a problem, etc. –  Michael Hampton Feb 25 at 17:44
    
It was my php-fpm conf - just solved it with the help of a colleague. I didn't have a php-fpm conf set up for this host, might have been ports clashing. Cloning another conf file has sorted it out –  Willshaw Media Feb 25 at 17:52

1 Answer 1

up vote 0 down vote accepted

I hadn't actually set up a different php-fpm conf file for this site, so it was defaulting to port 9000 and clashing with a different site on the same host.

Creating a new php-fpm file for the host fixed the problem, ensuring the port specified in the php-fpm conf matched the port in the nginx conf

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.