Sua configuração está faltando a ; no final da diretiva root .
Tente isto:
root /var/www;
Instalei nginx no meu Ubunut 12.04 , não consigo alterar o diretório raiz do nginx,
Este é o arquivo de configuração nginx padrão:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
#root /usr/share/nginx/html;
root /var/www
index index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
}
Eu tentei alterar o root para /var/www/ , mas de alguma forma ele não quer mudar.
Eu tentei reiniciar o nginx , mas não consigo alterar o diretório raiz.