# I configured nginx with php-fpm/fastcgi but not receiving headers at PHP end

**URL:** <https://www.ruby-forum.com/t/i-configured-nginx-with-php-fpm-fastcgi-but-not-receiving-headers-at-php-end/190936>\
**Category:** NGINX\
**Created:** [July 1, 2010, 6:59am UTC](https://www.ruby-forum.com/t/i-configured-nginx-with-php-fpm-fastcgi-but-not-receiving-headers-at-php-end/190936 "2010-07-01T06:59:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashvin\_Savani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Ashvin\_Savani](https://www.ruby-forum.com/u/Ashvin_Savani)\
**Post date:** [July 1, 2010, 6:59am UTC](https://www.ruby-forum.com/t/i-configured-nginx-with-php-fpm-fastcgi-but-not-receiving-headers-at-php-end/190936/1 "2010-07-01T06:59:46Z")

</div>

I am very new to nginx, Any hints?

You can check the test page at [http://74.86.84.197/t.php](http://74.86.84.197/t.php)

As you can see at bottom of this page there are no header related  
\_SERVER  
variables.

Here is my domain config file:

=============================================================  
server {  
listen 74.86.84.197:80;  
server\_name [scrubly.com](http://scrubly.com);

```
    location / {
            root /avinashi/sites/scrubly.com;
            index index.php;

            # if file exists return it right away
            if (-f $request_filename) {
                    break;
            }

            # otherwise rewrite the fucker
            if (!-e $request_filename) {
                    rewrite ^(.+)$ /index.php$1 last;
                    break;
            }

    }

    # if the request starts with our frontcontroller, pass it on to

```

fastcgi  
location ~ ^/(.+).php  
{  
fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_param SCRIPT\_FILENAME  
/avinashi/sites/scrubly.com  
$fastcgi\_script\_name;  
fastcgi\_param PATH\_INFO $fastcgi\_script\_name;  
#include /usr/local/nginx/conf/fastcgi\_params;

```
            fastcgi_connect_timeout 60;
            fastcgi_send_timeout 180;
            fastcgi_read_timeout 180;
            fastcgi_buffer_size 128k;
            fastcgi_buffers 4 256k;
            fastcgi_busy_buffers_size 256k;
            fastcgi_temp_file_write_size 256k;
            fastcgi_intercept_errors on;

    }

```

# }

And here is the nginx.conf

=============================================================  
worker\_processes 6;

error\_log logs/error.log debug;  
#error\_log logs/error.log notice;  
#error\_log logs/error.log info;

#pid logs/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
include mime.types;  
default\_type application/octet-stream;

```
log_format main '$remote_addr - $remote_user [$time_local] 

```

“$request”  
’  
'$status $body\_bytes\_sent “$http\_referer” ’  
‘“$http\_user\_agent” “$http\_x\_forwarded\_for”’;

```
#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 0;
#keepalive_timeout 65;

gzip on;
gzip_comp_level 1;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript

```

text/xml application/xml application/xml+rss text/javascript;

```
    include /etc/sites/*;

server {
    listen 80;
    server_name localhost;

    #charset koi8-r;

    #access_log logs/host.access.log main;

    location / {
        root html;
        index index.html index.htm;
    }

    #error_page 404 /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root html;
    }

```

# } }

Any help would be great!

Regards,

Ashvin Savani  
CEO & Chief Architect,  
FlashBrain - A Division of Avinashi
