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

Hello everybody.

I did a new installation of HestiaCP (1.1.1) on Ubuntu 18.04 and I’m having this when I do a systemctl status apache2.service:

● 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
   Active: active (running) since Sun 2020-05-10 17:10:42 BST; 5s ago
  Process: 20107 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 13987 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 20112 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 20138 (apache2)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/apache2.service
           ├─20138 /usr/sbin/apache2 -k start
           ├─20141 /usr/sbin/apache2 -k start
           ├─20144 /usr/sbin/apache2 -k start
           ├─20145 /usr/sbin/apache2 -k start
           ├─20146 /usr/sbin/apache2 -k start
           ├─20147 /usr/sbin/apache2 -k start
           └─20150 /usr/sbin/apache2 -k start

May 10 17:10:41 host1.server.com systemd[1]: Starting The Apache HTTP Server...
May 10 17:10:42 host1.server.com apachectl[20112]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using host1.server.com. Set the 'ServerName' directive globally to suppress this message
May 10 17:10:42 host1.server.com systemd[1]: Started The Apache HTTP Server.

Being host1.server.com my hostname.

Any hints on how to solve it?

Never had such an issue, probaly check the config file located at cat /etc/apache2/conf.d/PUBLIC-IP.conf, to verify if ServerName is set. But this is probaly only a vhost. Maybe someone else of the community has an answer ready?

Thanks for your anser.

This is the content of /etc/apache2/conf.d/PUBLIC-IP.conf:

Listen 12.456.789.123:8443
Listen 12.456.789.123:8080
<VirtualHost 12.456.789.123:8080>
    ServerName 12.456.789.123
    DocumentRoot /var/www/html/
    Alias /error/ /var/www/document_errors/


<VirtualHost 12.456.789.123:8443>
    ServerName 12.456.789.123
    DocumentRoot /var/www/html/
    Alias /error/ /var/www/document_errors/

    SSLEngine on
    SSLVerifyClient none
    SSLCertificateFile         /usr/local/hestia/ssl/certificate.crt
    SSLCertificateKeyFile      /usr/local/hestia/ssl/certificate.key


I guess the lines 4 and 11 should show my FQD instead of the IP?

No, the IP is in that case correct. Can you share more informations? Install string, os and version.

I used the following command in a fresh Ubuntu 18.04 installation:

sudo bash hst-install.sh --apache yes --nginx yes --phpfpm yes --multiphp yes --vsftpd yes --proftpd yes --named yes --mysql yes --postgresql yes --exim yes --dovecot yes --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota yes --api yes --force no --interactive yes --port 8909 --hostname host1.domain.com --lang en

Being domain.com my domain. Also, the command ignored the port I set up and used the default one.

That command was generated using https://gabizz.github.io/hestiacp-scriptline-generator/

The version installed is 1.1.1 release version, according to Hestia Panel.

Was the installation in interactive mode or where you asked for questions? Probaly it looks like a buggy installation string, we had this once today during ubuntu 20.04 testing.

Basicly rewrite the install string according to what you want to have manualy, if default is right, you dont need to add the switch. So basicly only bash hst-install-ubuntu.sh --multiphp yes --quota yes --port 8909 and do not use interactive mode, install it manualy with giving the hostname.

Let me know if this works properly, so we can do further debugging on the install script.

It was asked for questions. But the command I was using already had the --hostname host1.domain.com flag. I don’t know if you can see the entire command becase it goes out of the div, so I will write it again here without marking it as code:

sudo bash hst-install.sh --apache yes --nginx yes --phpfpm yes --multiphp yes --vsftpd yes --proftpd yes --named yes --mysql yes --postgresql yes --exim yes --dovecot yes --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota yes --api yes --force no --interactive yes --port 8909 --hostname host1.domain.com --lang en

OK, I’m reinstalling now. Let’s see how it goes. Thanks @ScIT !

Infact interactive was ignored, it looks like an issue in the install string - please let me know if a fresh install worked properly.

This time I used:

sudo bash hst-install.sh --multiphp yes --proftpd yes --postgresql yes --quota yes --port 8909 --hostname host1.domain.com --email [email protected] and the installation message was:

 _   _           _   _        ____ ____
 | | | | ___  ___| |_(_) __ _ / ___|  _ \
 | |_| |/ _ \/ __| __| |/ _` | |   | |_) |
 |  _  |  __/\__ \ |_| | (_| | |___|  __/
 |_| |_|\___||___/\__|_|\__,_|\____|_|

                      Hestia Control Panel


The following server components will be installed on your system:

   - NGINX Web / Proxy Server
   - Apache Web Server (as backend)
   - Multi-PHP Environment
   - Bind DNS Server
   - Exim Mail Server + ClamAV + SpamAssassin
   - Dovecot POP3/IMAP Server
   - MariaDB Database Server
   - PostgreSQL Database Server
   - ProFTPD FTP Server
   - Firewall (Iptables) + Fail2Ban Access Monitor


Would you like to continue with the installation? [Y/N]:

So no mention to quota, but in the list of plugins in the panel it seems to be activated.

systemctl status apache2.service is still giving the apachectl[882]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name. How should I proceed? I don’t mind reinstalling the system a few times more to test things, as it is empty at the moment.

Can you just use the string i suggested above? Wihtout giving the hostname. Was the port now set correctly?

I’m going to try again with just the line you gave me.

And yes, this time the port used is the one I gave in the flag. So I guess that’s positive. :slight_smile:

Abd it points that there is a bug in the install string. Step by step :slight_smile:

Ok, so with your line I don’t have the apache2 error… Anything else you want me to try?

Just a few minutes @eris has found a issue with the installer arguments - he just fixing it right now.

I think for now, all is done - as soon as we pushed the fix, the installation routine should work as usual it should. I’ll send a note here if you want to test it again.

Thanks for pointing us to it!

Excellent. Yes, let me know here and I will give it another try. I’m formatting the server once again and it’s ready to install Hestia once again.

1 Like

Not the solution

I have Ubuntu but I have been always downloading hst-install.sh. Should I try downloading hst-install-ubuntu.sh instead?


hst-install.sh will download hst-install-ubuntu.sh / Debian.sh depending on your OS.

Ok. I will let you know how this goes with my flags. Thanks!