Eu encontrei a solução. Este novo arquivo conf funciona.
worker_processes 2;
error_log logs/error.log;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 64;
access_log logs/access.log;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 75 20;
gzip on;
gzip_comp_level 1;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 80;
server_name localhost;
access_log logs/host.access.log;
location / {
root /var/www;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www;
}
location ~* ^.+\.(jpg|jpeg|gif)$ {
root /var/www;
access_log off;
expires 30d;
}
location ~ /\.ht {
deny all;
}
location ~ ^/~(.+?)(/.*\.php)?$ {
root /home/$1/public_html;
include php_fastcgi.conf;
fastcgi_param SCRIPT_FILENAME /home/$1/public_html$2;
}
location ~ ^/~(.+?)(/.*)?$ {
alias /home/$1/public_html$2;
index index.html index.htm;
autoindex on;
}
location ~ \.php$ {
root /var/www;
include php_fastcgi.conf;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
}
}