How to fix Apache – “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName” Error on Ubuntu

You might probably faced the same following error while you were restarting the Apache server on Ubuntu.
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
By default httpd.conf file will be blank. Now, simply add the following line to the file.
Save the file and exit from gEdit.
Finally restart the server.
Related Articles
Tags: Apache server, How to, Ubuntu, Ubuntu 8.10
This entry was posted on Friday, April 17th, 2009 at 4:54 am and is filed under Apache, How to, Ubuntu. You can follow any responses to this entry through the RSS 2.0 feed.


22nd April, 2009
THANK YOU. This was the simplest solution of any page I read. I read that httpd.conf is intentionally left blank now, which I didn’t quite expect at first. I am a n00b after all.
22nd April, 2009
Thank’s
23rd April, 2009
Thank You Aslam I have done and now what I get is the warning message “The Alias directive in /etc/apache/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias”. I would be happy if you can sort out this problem as well through mail,,,,,, Thanks lol
2nd May, 2009
Thanks it works.
10th June, 2009
thnks a lot…..
26th June, 2009
Hi Mr Aslam,
I cant test my apache server…
The requested URL /apache2-default/ was not found on this server.
Restarting web server apache2
… waiting
I encounter the above messages…
pls help me…
i am setting up eGroupware
thank you so much
27th June, 2009
Hi Joinkzz,
Can you please describe the steps that you followed? If you have made changes to the apache2.conf file which is located at /etc/apache2/apache2.conf file, or the hosts file located at /ect/hosts, please clearly state the changes that you have made.
1st July, 2009
I followed your instruction
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
sudo gedit /etc/apache2/httpd.conf
Now, simply add the follwing line to the httpd.conf file.
ServerName localhost
Save the file and exit from gEdit.
Finally restart the server.
sudo /etc/init.d/apache2 restart
and then this message showed…
Restarting web server apache2 … waiting [ OK ]
but when i checked htt://localhost/apache2-default to test my apache server is running,
This message appears:
The requested URL /apache2-default/ was not found on this server.
2nd July, 2009
[Thu Jul 02 19:13:46 2009] [warn] The Alias directive
Its really helped to me and still having below warning…please tell me how to avoid this warning…
in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
[Thu Jul 02 19:13:46 2009] [warn] The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
2nd July, 2009
@ joinkzz
Of course you can’t test the server by typing
http://localhost/apache2-default on the server.
It’s seems that your server is running properly. Because in the line
“Restarting web server apache2 … waiting [ OK ] ”
it tells that the server successfully restarted. To check the server whether it’s running or not, you can navigate your browser to
http://localhost/
If it says “It Works!”. Then it comes from your Apache server “www” directory. That means your server running successfully.
If you need any further clarification, feel free to post your question here.
3rd July, 2009
i am setting up an eGroupware software but i cant finish the setup. this result appears:
* You appear to have MySQL support.
* You appear to have MySQLi (php5) support.
* No PostgreSQL support found. Disabling
* No MS SQL Server support found. Disabling
* No ODBC support found. Disabling
* No Oracle support found. Disabling
* You appear to have PHP session support. Enabling PHP sessions.
* Found existing configuration file. Loading settings from the file…
* You need to add some domains to your header.inc.php.
what else should i do with this result?
thank sir Aslam…
10th July, 2009
Dear Joinkzz,
I never setup the eGroupware. These days i’m little busy with my final year project. I’ll try that out and let you know the exact steps after my final presentation.
11th July, 2009
Oooops… I apologize, Mr Aslam… \
I’ll be expecting your help…\
Thank you so much…
5th August, 2009
Wow, thanks a lot!
21st August, 2009
Beautifully simple and worked for me. Thank you!
3rd September, 2009
Superb yaar…I was really expecting this kind solution… Thank You…
15th September, 2009
Its always nice to see clear concise answers to problems, thankyou
23rd September, 2009
Спасибо
5th October, 2009
Thanks !!!!!
14th October, 2009
thanks buddy problem fixed
22nd October, 2009
THNXS, very simple and yet excelent fix my friend,
greetings from méxico!
27th October, 2009
Thank u very much, it worked
29th October, 2009
Thanks a lot ! I am a Chinese PHPER ~
6th November, 2009
Thanks a lot!! Too simple!
6th November, 2009
thanks.. it was very simple..
thanks lot aslam..
now im working with xampp without any prob..
11th November, 2009
Great simple solution, thanks!
11th November, 2009
Thanks a lot brother for providing the solution to a problem that has bothered so many.Most people proposing a fix on the web have really made it look quite complex, surprises me.
Thanks again,
Kamran.
16th November, 2009
Nice easy solution. My httpd.conf file was completely blank so I wasn’t sure if that would work, but it did. Thanks for posting this.
18th November, 2009
So nice ASLAM
it works
thank u
18th November, 2009
So simple yet effective. You rule dude! Thanks for sharing this solution.
23rd November, 2009
Thanks Aslam, worked for me
28th November, 2009
Tanks
1st December, 2009
not enough of sleep and too easy solution, what a nice combo. greetings from finland anyway:)
8th December, 2009
another thanks
14th December, 2009
A little over a day of searching…. Tried several other solutions…. All took numerous steps and did not work.
What a beautifully simple solution. Wish I had found it first.
Thank you so much!
15th December, 2009
It was a big help to me. I just edited the httpd.conf and restarted the apache , it worked.
Thanks
26th December, 2009
thanks, It solves my problem
3rd January, 2010
Thanks for the important but easy steps to fix the problem.
You might want to mention the .conf file will be blank just so it doesnt throw people off.
9th January, 2010
Yeah. Post Edited.
Thank you for the comment!
12th January, 2010
Really simple,
Thanks a lot!!!
13th January, 2010
Thanks for keeping it simple…. best I have seen as a solution to a relatively small error.