How to configure the access rights of a private wiki and its shared subwiki

I am new to XWiki and I want to setup XWiki as a farm so that we can have subwikis for several different purposes like internal development cooperation and knownledge sharing.
However, I want the unregistered user can only view one public subwiki. I configure the main wiki as following.
图片
图片
The subwiki configuration is as following.
图片
When try to visit the public subwiki, it is automatically redirect to login page.
How to configure the access rights for both main and sub wiki to allow unregistered user accessing?

I found the root cause that I have ticked checkbox of option “Prevent unregistered users from viewing pages, regardless of the page or space rights” in subwiki. After unchecking it, user can view the pages.