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: 227
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready