Protect keycloak admin panel

Hello dears.
I need some help for the keycloak and it’s i need to protect the admin panel of the keycloak i run keycloak with docker and nginx as reverse proxy but I don’t know how config it, do must set two domain and set hostname-admin env and also in html file of theme check location if / redirect to realm account can you help me with it.
I need nginx conf and docker compose env
For now i have a single sub domain like auth.example.com and when I enter the address then auto redirect to the admin panel of keycloak

You have to set the environment variable KC_HOSTNAME_ADMIN with the URL you want for admin console.
Read the doc to understand how it works: All configuration - Keycloak