Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Pulling my hairs out here can't figure out why :

My virtual host in /etc/nginx/sites-available/

server {
        listen   80 default;

        location /
        {
                root   /var/www;
                index  index.php;                     
        }

        location ~* \.php$
        {
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
                include fastcgi_params;
        }
    }

nginx.conf

user www;
worker_processes 4;
pid /var/run/nginx.pid;

events {
    worker_connections 768;
    multi_accept on;
}

http {

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    server_tokens off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;


    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;



    gzip on;
    gzip_disable "msie6";


    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

installed packages

  • php5-cgi
  • php5-fpm
  • php5-mysql
  • nginx

on fresh clean install ubuntu 11.04.

curl'ing the ip gives me the php file 'not interpreted'

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Suggest you maximize verbosity of all logs, and paste all log entries associated with your 'non-interpreted' request.

Also, I was setting up a server just yesterday, diff components but same non-interpret result - turned out I just hadn't restarted all appropriate services to pick up the php engine for parsing.

share|improve this answer
    
Right ... i'm really 'dumb' sometimes ... didn't notice the big fat '500' error from PHP. Thanks ! –  Disco Apr 29 '11 at 16:16
2  
To elaborate, OP has default_type application/octet-stream; So if the backend doesn't provide a mime type such as when errors happen then it will default to application/octet-stream, which is of course a download. –  Martin Fjordvald Apr 29 '11 at 16:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.