How to get public.php working for social app

Hi There,

I am trying to get the social app running.
In general my instance seems to work fine, I do not get any warnings on missing Rewrite rules or such.

I figured out to change the rewrite rule from
RewriteRule ^\.well-known/webfinger /community/index.php/.well-known/webfinger
to
RewriteRule ^\.well-known/webfinger /community/public.php?service=webfinger [QSA,L]

However, this is now returning a 404 error although existing. I had a look (being not a developer) into the file and found out that the public.php will return 404 in different cases.
Does anybody has a proper setup guideline what to do to get public.php running for the social app to get rid of the error:

Thanks a lot!
Matthias