I want to have a location directive for the url "localhost/test/" in the nginx configuration.
I tried the following in the configuration file:
server {
listen 80;
server_name localhost;
location /test/ {
root /home/test;
index index.html index.htm
}
}
This always give me a 404 error. Then i tried this one
server {
listen 80;
server_name localhost;
location / {
root /home/test;
index index.html index.htm
}
}
It just works fine on url "localhost"
I can't understand why it throws a 404 error in the first case !!