Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/;

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
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
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

Your Answer


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.