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_index index.php;
                fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
                include fastcgi_params;


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'

1 Answer 1


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.

  • Right ... i'm really 'dumb' sometimes ... didn't notice the big fat '500' error from PHP. Thanks !
    – Disco
    Apr 29, 2011 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. Apr 29, 2011 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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