Welcome! Log In Create A New Profile

Advanced

why can i get what I want about location directive?

Posted by blitz 
why can i get what I want about location directive?
January 03, 2017 10:09PM
location = / {
root /usr/share/nginx/myhtml;
index test.html;
}

location / {
root /usr/share/nginx/html;
index index.html;
}

when I request http://localhost, I get /usr/share/nginx/html/test.html,which is not exist,so I get 404 not found.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 8 on December 15, 2016
Record Number of Guests: 386 on August 02, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready