Following are default locations of nginx webroot with standard installations:
- Ubuntu 12.04: /usr/share/nginx/www
- Ubuntu 14.04: /usr/share/nginx/html
- Mac OS (brew): /usr/local/var/www
On Ubuntu 14.04, the webroot is defined in
/etc/nginx/sites-enabled/default
You should something like:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
...
}
To change the webroot, simply change root to your preferred address, for example:
root /var/www
to change webroot to /var/www.