root is missing. how do I install it?

Posted August 27, 2015 4.4k views

Hello, I am new at this and I followed “Introduction to Nginx and LEMP on Ubuntu 14.04” tutorial. I am stuck on part 3 where it says “root /var/www/;”

This is the error I am getting:

v@V:~$ root /var/www/;
-bash: /usr/bin/root: No such file or directory

Seems like I don’t have root set up?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

The part you are reading is to be modified in the config file. Not an actual command to type.

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /usr/share/nginx/html;   <---- HERE :D
    index index.html index.htm;

    server_name localhost;

    location / {
        try_files $uri $uri/ =404;
  • “The next thing we’re going to have to adjust is the document root, specified by the root directive. Point it to the site’s document root that you created:

    root /var/www/;

    It wants you to define where you are going to store your web files.

  • ah dang! Rookie mistake.. I got it. Thanks! :)