I have several site collections in my web application. I was the primary administrator and also farm admin. I wanted to enable access to the welcome page without login so I checked "enable anonymous access" at authentication providers of the web application.
Sharepoint 2016 Central administration -> Appl management -> Manage web appl -> my web application -> authentication providers in the ribbon, then the active auth provider link in the dialog and check "enable anonymous access".
Now unfortunatelly I lost access to my site collections in this web application. I unchecked/cleared the box of "enable anonymous access" but it did not solve the problem.
When I tried to open the sites in IE I got http 404. It looks like I lost the sharepoint groups - visitors, owners, members. I tried to recreate and associate them at central admin but now I got "You need permission to access this site".
Now I simply want to get back access to my sites, anonymous access is not important.
Any help appreciated.