'Nginx error: rewrite or internal redirection cycle while internally redirecting to "/index.md"

I am trying to serve a vue app that has an index.md file as the root file. here is my nginx config:

server {

    listen 7072;

    listen [::]:7072;

    root /home/dave/web/dist;

    index  index.md index.htm index.html index.php;

    server_name 0.0.0.0:7072;

    location / {

        # First attempt to serve request as file, then 

        # as directory, then fall back to displaying a 404. 

        root /home/dave/web/dist;

        try_files $uri /index.md;
        

    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source