User:Woozle/nginx

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< User:Woozle
Revision as of 18:21, 22 June 2012 by Woozle (talk | contribs) (→‎File Locations: another link to new conf page)
Jump to navigation Jump to search

The Problem

nginx works with static files (and Ruby), but will not execute PHP files. PHP runs fine from a command line.

On requesting a PHP file (such as http://wiki.makeyourlaws.org/phpinfo.php), here's what seems to be happening:

  • nginx receives the request
  • nginx forwards it to PHP-FPM
    • This can be done one of two ways -- either via a UNIX pipe or via a port. I've tried both; currently using port, I think.
  • PHP never receives the request; the log file does not show it.
  • nginx somehow receives a success code, and logs the request as successful (http code 200) returning a result of zero bytes.
  • The web browser displays a blank page.

Notes

2012-06-21

Looks like the package "spawn-fcgi" may be the part of FastCGI that I need to install, extrapolating from this. Installing it...

Background

  • Distro: Ubuntu 10.04.4 LTS

nginx was compiled from source; PHP5 was installed from standard Ubuntu packages.

File Locations

Folder Listings

  • /opt/nginx
    total 25532
drwx------  2 nobody root     4096 2012-04-26 18:47 client_body_temp
drwxrwxr-x  2 root   root     4096 2012-06-09 22:25 conf
drwx------  2 nobody root     4096 2011-12-02 23:20 fastcgi_temp
drwxr-xr-x  2 root   root     4096 2011-12-02 22:52 html
drwxrwxr-x  2 root   root 26071040 2012-06-11 06:43 logs
drwx------  2 nobody root     4096 2011-12-02 23:20 proxy_temp
drwxrwxr-x  2 root   root     4096 2012-04-22 04:41 sbin
drwx------  2 nobody root     4096 2011-12-02 23:20 scgi_temp
drwx------  2 nobody root     4096 2011-12-02 23:20 uwsgi_temp
  • /opt/nginx/conf
    total 80
-rw-r--r--  1 root root  979 2011-12-02 22:52 fastcgi.conf
-rw-r--r--  1 root root  979 2012-04-22 04:41 fastcgi.conf.default
-rw-r--r--  1 root root  909 2011-12-02 22:52 fastcgi_params
-rw-r--r--  1 root root  909 2012-04-22 04:41 fastcgi_params.default
-rw-r--r--  1 root root 2837 2012-04-22 04:41 koi-utf
-rw-r--r--  1 root root 2223 2012-04-22 04:41 koi-win
-rw-r--r--  1 root root 3362 2011-12-02 22:52 mime.types
-rw-r--r--  1 root root 3463 2012-04-22 04:41 mime.types.default
-rw-r--r--  1 root root 6651 2012-06-10 18:50 nginx.conf
-rw-r--r--  1 root root 2685 2012-04-22 04:41 nginx.conf.default
-rw-------  1 root root    0 2012-04-23 16:29 nginx.conf.save
-rw-r--r--  1 root root 4208 2012-04-23 16:29 nginx.conf.save.1
-rw-r--r--  1 root root  544 2011-12-02 22:52 scgi_params
-rw-r--r--  1 root root  544 2012-04-22 04:41 scgi_params.default
-rw-r--r--  1 root root  570 2011-12-02 22:52 uwsgi_params
-rw-r--r--  1 root root  570 2012-04-22 04:41 uwsgi_params.default
-rw-r--r--  1 root root 3610 2012-04-22 04:41 win-utf

Links