Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th December 2011, 17:01
talkingnews talkingnews is offline
Member
 
Join Date: Jan 2011
Posts: 65
Thanks: 15
Thanked 5 Times in 5 Posts
Question nginx + php-fpm = various problems for SOME sites inc 500 or 404 or no input file

I've got 5 sites on Ubuntu 11.10 with ISPC 3.0.4.1 and Nginx 1.0.10

2 of them are running just fine - 1 running phpbb, the other a shopping cart (Zen Cart) with ssl. In order to make Zen Cart work, I had to make these changes to workaround a php bug http://forum.nginx.org/read.php?11,2...664#msg-219664
phpbb works with or without those changes.

But for sites I recently create, I get a 404 or a 500 or "No input file specified.".
It seems to change every time I do I restart php5-fpm which I have to do manually as ISPC doesn't do that.
But the crazy thing is, if I browse to a text file, it'll show it, but most of the time if I try a php file, like phpinfo, it'll say "file not found", even though I can see it right there in ftp in the same folder as the text file with the correct permissions, and the only difference with the try_files for php is to the working site is the php socket. And I've checked that the php for that pool is running via ps, and there's no startup error in the fpm log.

I've badgered my VPS host and now have 5 separate IPs, each site running on it's own IP.

I've put http_debug and in the debug log, I'm seeing debug info for one of my other sites mixed in with it!

I've printed out the fpm pool configs and the nginx conf files for the sites and compared them. I've made sure the users and groups and owner and permissions and open_basedir are correct. I've looked in the fpm logs and the nginx logs and it doesn't even give a clue. I've checked the symlinks, I've tried the real path instead of the symlink, I've checked the IP addresses...

I've rebooted the whole server, I've taken the sites offline and back online, I've even tried deleting and re-creating the sites.

I'd really appreciate some help here - I've been at this all yesterday and most of today and slept 3 hours last night and I've exhausted pretty much every relevant thread here, on the Nginx forums (which are almost completely lifeless) and StackOverflow.

Last edited by talkingnews; 9th December 2011 at 17:26.
Reply With Quote
Sponsored Links
  #2  
Old 10th December 2011, 11:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by talkingnews View Post
It seems to change every time I do I restart php5-fpm which I have to do manually as ISPC doesn't do that.
ISPConfig does restart PHP-FPM, but unfortunately Ubuntu 11.10 is so buggy that this doesn't work all the time, and you sometimes have to do it manually.

Can you post the vhost configuration of a working and a not-working site?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th December 2011, 16:58
talkingnews talkingnews is offline
Member
 
Join Date: Jan 2011
Posts: 65
Thanks: 15
Thanked 5 Times in 5 Posts
Default

Thanks Falko! OK, here we go:

Perfectly working site - runs like a dream:
http://pastebin.com/Y3q6wQb8

NON working site on same server which shows 404 for all php scripts:
http://pastebin.com/KeEUAEru
Again, I've double, triple checked user and dir owner and perms on those files.
Plain text files work just fine.

Incidentally, when I turn off "use own error documents" I get "no input file specified" for the php file which I know exists.

When I turn them back on, I get "404 not found" for that file.

Also, the wordpress example section of nginx says it requires cgi.fix_pathinfo = 0 - althugh it seems to make no difference, and even a plain old phpinfo.php file in the root dir fails. And yet on the other site, on the same server, all is good. But is that cgi.fix_pathinfo = 0 going to give me problems if I put it in?

EDIT: Another long night poring through the logs - this looks a bit odd to me.. why am I seeing random and occasional entries from other sites on my ISPC?
The log below belongs to web9, btw..

This log entry is from a site that doesn't work, but does at least match the site AND web number

2011/12/10 16:19:18 [error] 29469#0: *2745 open() "/var/www/web9.co.uk/web/files/Package.pdf" failed (2: No such file or directory), client: 66.249.72.x, server: web9.co.uk, request: "GET /files/Diamond.pdf HTTP/1.1", host: "web9.co.uk"

The next one is from a WORKING site, but a completely different user:

2011/12/10 08:22:13 [error] 17201#0: *47071 open() "/var/www/web9.co.uk/web/forum/images/Logo.gif" failed (2: No such file or directory), client: 66.249.72.x, server: web9.co.uk, request: "GET /forum/images/Logo.gif HTTP/1.1", host: "web1.co.uk"

Next up, an entry from a NON working site:

2011/12/10 22:04:55 [error] 29471#0: *22753 open() "/var/www/web9.co.uk/web/mp3/10-12-11.mp3" failed (2: No such file or directory), client: 84.93.146.x, server: web9.co.uk, request: "GET /mp3/10-12-11.mp3 HTTP/1.1", host: "www.web12.co.uk"

Here's what /var/www looks like

Code:
drwxr-xr-x  5 root    root     4096 2011-12-07 05:20 .
drwxr-xr-x 15 root    root     4096 2011-12-09 00:32 ..
drwxr-xr-x  2 ispapps ispapps  4096 2011-11-27 19:57 apps
lrwxrwxrwx  1 root    root       30 2011-12-06 14:15 web9.co.uk -> /var/www/clients/client3/web9/
drwxr-xr-x  7 root    root     4096 2011-12-06 11:30 clients
lrwxrwxrwx  1 root    root       30 2011-12-02 13:13 web3.co.uk -> /var/www/clients/client3/web3/
-rw-r--r--  1 root    root     1985 2011-11-25 17:40 index.html
-rw-r--r--  1 root    root    13177 2011-11-27 17:05 ispconfig_install.log
lrwxrwxrwx  1 root    root       30 2011-12-06 11:30 web5.co.uk -> /var/www/clients/client4/web5/
lrwxrwxrwx  1 root    root       30 2011-11-27 17:14 web1.co.uk -> /var/www/clients/client0/web1/
lrwxrwxrwx  1 root    root       31 2011-12-07 05:20 web12.co.uk -> /var/www/clients/client2/web12/
lrwxrwxrwx  1 root    root       31 2011-12-07 05:17 web11.co.uk -> /var/www/clients/client2/web11/
drwxr-xr-x  2 root    root     4096 2011-11-26 20:09 webalizer
And here's a failed request from one of the non-working sites when I turn debug_http on:

Code:
2011/12/11 09:48:43 [debug] 4310#0: *9 http upstream dummy handler
2011/12/11 09:48:43 [debug] 4310#0: *9 http run request: "/index.php?"
2011/12/11 09:48:43 [debug] 4310#0: *9 http upstream check client, write event:1, "/index.php"
2011/12/11 09:48:43 [debug] 4310#0: *9 http upstream recv(): -1 (11: Resource temporarily unavailable)
2011/12/11 09:48:43 [debug] 4310#0: *9 http upstream request: "/index.php?"
2011/12/11 09:48:43 [debug] 4310#0: *9 http upstream dummy handler
2011/12/11 09:48:43 [debug] 4310#0: *9 http upstream request: "/index.php?"
But if I look in php5-fpm.log, it there's nothing since I restarted it 2 days ago:

Code:
[09-Dec-2011 15:32:18] NOTICE: fpm is running, pid 17036
[09-Dec-2011 15:32:18] NOTICE: ready to handle connections
Confused!

Last edited by talkingnews; 11th December 2011 at 10:58. Reason: More info
Reply With Quote
  #4  
Old 11th December 2011, 18:02
talkingnews talkingnews is offline
Member
 
Join Date: Jan 2011
Posts: 65
Thanks: 15
Thanked 5 Times in 5 Posts
 
Default

Right, well I seem to have fixed it, with a workaround.

Untick "Use Socket For PHP-FPM" in ALL the sites, even the working ones.

Then service php5-fpm restart.

That's got me working - but I have a feeling this isn't ideal, as many guides say socket is preferable.

So many unanswered questions here, but I'm 4 unpaid days behind now, so it can wait until I've caught up, but I'd love to get to reason behind this one day.
Reply With Quote
Reply

Bookmarks

Tags
500, nginx, no input file specified, php-fpm

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 6.0 support Acid_Scorpion Developers' Forum 47 16th September 2011 10:36
Can't receive mails baicunko Server Operation 12 3rd August 2011 22:02
ISPConfig3 Debian Squeeze Crontab - Log petrichbg Installation/Configuration 5 22nd March 2011 12:25
Email problem 'Cannot set my user or group id.' (using ISPConfig 3 + OpenSuSE 11.2) urosm Installation/Configuration 5 19th June 2010 22:41
Facing problem with ICMP (ping request) princeu28 Installation/Configuration 5 14th August 2008 00:13


All times are GMT +2. The time now is 20:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.