Nginx Not Passing URL Parameters

Posted by jmccartie on Server Fault See other posts from Server Fault or by jmccartie
Published on 2009-06-22T18:51:55Z Indexed on 2010/03/28 16:03 UTC
Read the original article Hit count: 411

Filed under:
|

Messing around with Nginx ... for some reason, it looks like none of my URL parameters are being passed. My homepage loads fine, but a URL like "http://mysite.com/more.php?id=101" throws errors, saying that the ID is an undefined index.

I'm assuming this is something basic I'm missing in a conf file.

Some info: conf.d/virtual.conf

server {
    listen       80;
    server_name  dev.mysite.com;
    index   index.php;
    root   /var/www/dev.mysite.com_html;

    location / {
    root /var/www/dev.mysite.com_html;
    }
    location ~ \.php(.*)$  {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME /var/www/wap/dev.mysite.com_html/$fastcgi_script_n
ame;
    fastcgi_index index.php;
include /etc/nginx/fastcgi_params;

    }
}

Error log:

2009/06/22 11:44:21 [notice] 16319#0: start worker process 16322
2009/06/22 11:44:28 [error] 16320#0: *1 FastCGI sent in stderr: "PHP Notice:  Undefined index:  id in /var/www/dev.mysite.com_html/more.php on line 10

Thanks in advance.

© Server Fault or respective owner

Related posts about php

Related posts about nginx