How to redirect index.html to the same name with capital letter by nginx

Solution 1:

Without further information on your use case, here is one attempt:

location ~ (.*)/index.html$ {
    return 301 $1/Index.html;
}