16

I upgraded to ubuntu 14.04 yesterday. But after restarting PC , this message continues to appear in a black screen after the ubuntu loading screen and don't go away and ubuntu doesn't start I can do nothing about this. what should I do? I tried logging in from other terminals and do asm here but still nothing

Tamim Addari
  • 969
  • 4
  • 11
  • 29
  • 2
    possible duplicate of [Could not reliably determine the server's fully qualified domain name?](http://askubuntu.com/questions/256013/could-not-reliably-determine-the-servers-fully-qualified-domain-name) – HorusKol Sep 11 '14 at 07:28

3 Answers3

28

This can be overcome by two way.

  1. Add ServerName localhost as the last line in /etc/apache2/apache2.conf file.

  2. Create a file named /etc/apache2/conf-available/servername.conf and add the string ServerName localhost inside and save it. Create a soft link under /etc/apache2/conf-enabled as follows

    ln -s /etc/apache2/conf-available/servername.conf .
    # or
    a2enconf servername
    

and restart the server.

The string localhost can be replaced with any valid domain name (ie. example.com).

muru
  • 193,181
  • 53
  • 473
  • 722
ccsen
  • 296
  • 3
  • 3
4

Another way of performing the second option suggested by ccsen is the following:

  1. Create a file in /etc/apache2/conf-available/ with any desired name. servername.conf is a suitable option.

  2. Add the following line to the created file: ServerName yourservername. yourservername can be set to anything you want.

  3. Then run the following from a terminal: sudo a2enconf servername (assuming you called the file added to conf-available on step 1 'servername.conf').

  4. Finally, run the following from the terminal: sudo service apache2 reload

Although both methods achieve the same result, I believe this one is cleaner since apache takes care of the symlinks and enabling the configuration.

aWebDeveloper
  • 633
  • 1
  • 8
  • 14
Vic07
  • 41
  • 1
4

A third way is to configure your computer's hosts file:

127.0.0.1       localhost
127.0.1.1       servername.domain.com       servername
HorusKol
  • 1,467
  • 3
  • 15
  • 31