Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Confused with the Equal modifier...

$
0
0
This is how my configuration looks like...

server {
listen 80;
server_name 127.0.0.1 localhost;

location = / {
index index.html;
}

location / {
root /etc/nginx/html/app1;
}
}


In my folder app1 I have two files, index.html & home.html

If I browse http://localhost/ or http://localhost/index.html or http://localhost/home.html page it comes up well.

When I change the configuration like so...

server {
listen 80;
server_name 127.0.0.1 localhost;

location = / {
index home.html;
}

location / {
root /etc/nginx/html/app1;
}
}

http://localhost:8888/index.html > works
http://localhost:8888/home.html > works
http://localhost:8888/ > 403 forbidden!!!

Can someone please tell me what is wrong?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>