root is missing. how do I install it?

August 27, 2015 1k 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/example.com/html;"

This is the error I am getting:

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

Seems like I don't have root set up?

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/example.com/html;

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

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

Have another answer? Share your knowledge.