[Solve] Problem AH00558 When Restarting Apache2

Wednesday, October 30, 2013

I'm trying to restart apache2 using this command:
sudo service apache2 restart
or
sudo /etc/init.d/apache2 restart

But get below error:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.

So, how to fix this problem?

Edit file apache2.conf from directory /etc/apache2/ by use this following command:
nano /etc/apache2/apache2.conf

Add the following syntax in the last row of apache2.conf file:
ServerName localhost


So that error doesn't disappear.

24 comments

  1. works great, thanks!

    ReplyDelete
  2. Muchísimas gracias me sirvio

    ReplyDelete
  3. /etc/apache2/
    # |-- apache2.conf
    # | `-- ports.conf
    # |-- mods-enabled
    # | |-- *.load
    # | `-- *.conf
    # |-- conf-enabled
    # | `-- *.conf
    # `-- sites-enabled
    # `-- *.conf

    where to add ServerName localhost?
    /etc/apache2/
    # |-- apache2.conf ServerName localhost
    # | `-- ports.conf
    # |-- mods-enabled
    # | |-- *.load
    # | `-- *.conf
    # |-- conf-enabled
    # | `-- *.conf
    # `-- sites-enabled
    # `-- *.conf

    ReplyDelete
  4. thank you very much!

    ReplyDelete
  5. thanks !
    A_marucevich

    ReplyDelete
  6. That worked! Thank you!

    ReplyDelete
  7. Si funciona&
    Gracias

    ReplyDelete
  8. /etc/apache2/
    # |-- apache2.conf
    # | `-- ports.conf
    # |-- mods-enabled
    # | |-- *.load
    # | `-- *.conf
    # |-- conf-enabled
    # | `-- *.conf
    # `-- sites-enabled
    # `-- *.conf

    where to add ServerName localhost?
    /etc/apache2/
    # |-- apache2.conf ServerName localhost
    # | `-- ports.conf
    # |-- mods-enabled
    # | |-- *.load
    # | `-- *.conf
    # |-- conf-enabled
    # | `-- *.conf
    # `-- sites-enabled
    # `-- *.conf


    ?????????????????????????????????

    ReplyDelete
  9. Its is

    # It is split into serveral files forming the configuration hierarchy outliend
    # below, all located in the /etc/apache/ directory;
    ServerName zabbix <-- (here is he name your server)
    #
    # /etc/apache2/
    # |-- apache2.conf
    # | `-- ports.conf
    # |-- mods-enabled
    # | |-- *.load
    # | `-- *.conf
    # |-- conf-enabled
    # | `-- *.conf
    # `-- sites-enabled
    # `-- *.conf

    :wq



    service apache2 restart


    Look, Your have whats modification your table Host

    vi /etc/hosts

    127.0.0.1 zabbix <--- (here is he name your server)
    127.0.1.1 ubuntu

    Test
    In one Browser

    http://zabbix/zabbix


    Sucesfull !!

    I am from Chile :D

    ReplyDelete
  10. Thak U

    It really works!!

    ReplyDelete

 

Search This Blog

Follow My Twitter