Difference between revisions of "User:Woozle/nginx"
Jump to navigation
Jump to search
(description of the problem) |
(link to G+ thread) |
||
Line 49: | Line 49: | ||
-rw-r--r-- 1 root root 570 2012-04-22 04:41 uwsgi_params.default | -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 | -rw-r--r-- 1 root root 3610 2012-04-22 04:41 win-utf | ||
+ | ==Links== | ||
+ | * [https://plus.google.com/100183759660923071401/posts/W1sJmF77gTY discussion] |
Revision as of 22:51, 20 June 2012
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.
Background
- Distro: Ubuntu 10.04.4 LTS
nginx was compiled from source; PHP5 was installed from standard Ubuntu packages.
File Locations
- /opt/nginx/ - configuration and logging folders
- /opt/nginx/conf/nginx.conf - master config file
- /etc/php5/fpm/ - PHP-FPM configuration
- /etc/php5/fpm/pool.d/www.conf - config file to actually edit
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