You are not logged in.
Hey guys. Does anyone have an nginx + php-fpm setup working? I have been struggling with a blank page (404) for several days, any help would be super appreciated!
Pacman installs:
php-5.3.6-5
php-fpm-5.3.6-5
nginx-1.0.5-1
nginx.conf
http
{
server
{
listen 80;
server_name subdomain.domain.com;
access_log /var/log/nginx/access.log custom;
error_log /var/log/nginx/error.log;
root /users/null/subdomain;
index test.php;
location ~ \.php$
{
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index test.php;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME /users/null/subdomain$fastcgi_script_name;
}
}
}
Additional server without php is functioning normally
fastcgi.conf
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
php-fpm.conf
listen = 127.0.0.1:9000
;listen = /var/run/php-fpm/php-fpm.sock
Everything else default install, nothing changed
php.ini
Default install, nothing changed
php-fpm.log
[05-Aug-2011 13:33:24] NOTICE: Reloading in progress ...
[05-Aug-2011 13:33:24] NOTICE: reloading: execvp("/usr/sbin/php-fpm", {"/usr/sbin/php-fpm"})
[05-Aug-2011 13:33:24] NOTICE: using inherited socket fd=6, "127.0.0.1:9000"
[05-Aug-2011 13:33:24] NOTICE: using inherited socket fd=6, "127.0.0.1:9000"
[05-Aug-2011 13:33:24] NOTICE: fpm is running, pid 3944
[05-Aug-2011 13:33:24] NOTICE: ready to handle connections
[05-Aug-2011 14:55:59] NOTICE: configuration file /etc/php/php-fpm.conf test is successful
nginx/access.log
05/Aug/2011:15:31:50 -0700 | 404 | 31 | - | GET / HTTP/1.1 | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3
nginx/error.log
No errors reported
I'm pulling out my hair at this point. I have tried various nginx configurations from Google results on nginx + php-fpm but they don't seem to work, although people are clearly getting theirs working. What am I missing? I don't understand why all I get is a blank page and 404 errors in the access log. Any pointers would be much appreciated.
Offline
You point fcgi to /users/null/subdomain/test.php Does that even exist?
Last edited by Spider.007 (2011-08-06 09:49:00)
Offline
Yes, /users/null/subdomain/test.php does exist. All files are dumped in the /users/null/subdomain/ directory, all without subdirectories. test.php and /users/null/subdomain/ also have temporary 777 permissions to rule out any complications there.
Offline