Nginx webroot

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


You should something like:

Installing Nginx on Ubuntu

Nginx is a powerful web server which is rapidly taking market share from Apache. Here you will see how easy it is to install and use Nginx.

sudo apt-get update
sudo apt-get install nginx

Installation complete! Type the IP of your web host in the browser to test it. If you don't know your IP, run the following command

ip addr show | grep inet

It will list several IPs, use the one attached to eth0 or eth1.

Starting, Stopping, Restarting Nginx