nginx keeps adding trailing slash

I want to create an alias to the “static” folder: location ~ ^/myapp/([a-zA-Z0-9_-]+)/ { alias /var/lib/myapp/$1/static/; autoindex on; } But, if I have the URL: https://mydomain/myapp/section1/page.html I’m being redirected to: https://mydomain/myapp/section1/page.html/ which causes a 404. If I access: https://mydomain/myapp/section1/ I can correctly see the list of all the html files (because of “autoindex on”). However,…

Details