Apache2 could not reliably determine the server's fully qualified domain name

I think the problem is here:

if [ "$proftpd" = 'yes' ]; then
    echo "(*) Configuring ProFTPD server..."
    echo "127.0.0.1 $servername" >> /etc/hosts
    cp -f $HESTIA_INSTALL_DIR/proftpd/proftpd.conf /etc/proftpd/
    update-rc.d proftpd defaults > /dev/null 2>&1
    systemctl start proftpd >> $LOG
    check_result $? "proftpd start failed"
fi

Particularly at echo "127.0.0.1 $servername" >> /etc/hosts. If ProFTPD is not installed, the file /etc/hosts looks like this:

127.0.0.1       localhost
12.34.56.789    vpsdefaultname.company.net       vpsdefaultname
127.0.1.1       vpsdefaultname.company.net       vpsdefaultname

Where vpsdeaultname is the name the hosting company gives to my VM by default. Therefore $servername is not added to etc/hosts but the systemctl status apache2.service gives no error:

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: active (running) since Sat 2020-05-16 00:13:17 CEST; 19min ago
  Process: 842 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 1175 (apache2)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/apache2.service
           ├─1175 /usr/sbin/apache2 -k start
           ├─1182 /usr/sbin/apache2 -k start
           ├─1244 /usr/sbin/apache2 -k start
           ├─1250 /usr/sbin/apache2 -k start
           ├─1255 /usr/sbin/apache2 -k start
           ├─1263 /usr/sbin/apache2 -k start
           └─1275 /usr/sbin/apache2 -k start

May 16 00:13:15 host1.server.com systemd[1]: Starting The Apache HTTP Server...
May 16 00:13:17 host1.server.com systemd[1]: Started The Apache HTTP Server.