how to set so that the control panel can only be accessed through the hostname only, if the ipaddress is accessed then it cannot or is limited.
You could edit /usr/local/hestia/nginx/conf/nginx.conf and add this to the server block:
if ($host ~* "^\d+\.\d+\.\d+\.\d+$") {
return 444;
}
In context:
ssl_certificate /usr/local/hestia/ssl/certificate.crt;
ssl_certificate_key /usr/local/hestia/ssl/certificate.key;
# TLS 1.3 0-RTT anti-replay
if ($anti_replay = 307) { return 307 https://$host:$server_port$request_uri; }
if ($anti_replay = 425) { return 425; }
if ($host ~* "^\d+\.\d+\.\d+\.\d+$") {
return 444;
}
location / {
expires off;
index index.php;
}
To apply the new conf:
systemctl restart hestia
Note: This conf could be overwritten on Hestia updates.