I am trying to use nginx on a linux aws instance. I installed nginx and used sudo service nginx start then when I go to my public ip i dont see the nginx test site. Instead what I see is Index of / page with folders inside my htdocs listed. I used sudo service nginx status to check status and it shows that nginx is active. Why is this happening why isn't the nginx root html file showing up. Any help is appreciated.
/etc/nginx/sites-available/default :
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
}