cnak2
cnak2

Reputation: 1841

Nginx web server is not pointing to the right directory

I have recently setup a new server with nginx as my web server.

I have created a directory 'WWW/server' where I store my node/express application, which runs fine on another server.

The default nginx directory is /var/www/html.

I've changed that pointer in the default file from root /var/www/html/ to root /WWW/server/

But this doesn't seem to change after I restart the nginx server.

How do you change the app director??????

Upvotes: 0

Views: 1021

Answers (1)

idanoo
idanoo

Reputation: 116

It's hard to see what's going on without your nginx config file.

default is:

root /var/www/html;

you should be able to change it to:

root /WWW/server;

Make sure you use an absolute directory and not a relative one (eg /WWW/server instead of WWW/server), and make sure that the folder exists too, (ls /WWW/server)

Upvotes: 1

Related Questions