I am having the exactly same issue and neither of the sollutions worked out for me. Unable to access my aapanel trought panel.mydomain.com , neither with the explicit port nor in any other way but with the direct ip of my server.

Edit: Thotght I found the sollution installing the SYS firewall and inserting 7800 port on the security tab, but even that worked out for me.

    aaP_lucaaamaral
    Hello, have you solved the problem?
    If not, check whether the domain name resolution points to the IP address of the server and the proxy is not enabled
    Check if the full link access panel is used

    24 days later

    aaP_usanuman this works for me i am using cloudflare what i did is below and 100% working.

    1. Create A record in cloudflare input server IP
    2. Generate Client certificate in cloudflare then copy (Key & Certificate (in pem format))
    3. Go to AAPANEL enable cloudflare supported PORT as written above.
    4. AAPANEL> setting enter domain or subdomain address
      5.Enable SSL select i have certificate and paste the cloudflare in step2 and save.

    Hope this will help others who bump into this kind of situation.

    10 days later

    I have the same problem. I did all of the above solutions but it doesn't work for me. Unable to set domain for accessing panel

      10 days later

      aaP_agilsetiawan772
      me too, actually I've been trying for couple years already 😄
      I tried everything with no luck.

      I wonder how important is to set the domain and SSL for the panel if I'm the only one using it,,, any thoughts?
      Thanks.

        aaPanel_Kern
        Wow!! that's a very detailed guide!
        I will try it out and get back.
        Thanks a lot for all your great work with this panel!

        aaPanel_Kern
        I tried with let's encrypt (created in a website), cloudflare, and also self certificate.
        In all of them I get this error

        Any clues?
        Thanks!

          aaPanel_Kern
          Thanks as usual!
          I tried and get this message

          Should I use this command?

          /www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip

            aaPanel_Kern
            Wow!!! it's working now!!
            Thanks!!!!!!
            one last question... I use this server for one site only example.com
            Is it safe to make anther site panel.example.com, and use the same cloudflare ssl certificate?
            or is it better to make a lets encrypt sll different from the main domain?
            By the way I'm using IP, not domain name on my panel

            Thanks again!

              2 months later