Reputation: 129
When i try to restart apache issueing /etc/init.d/apache2 restart i get the following messages:
root@server:~# /etc/init.d/apache2 restart
* Restarting web server apache2 apache2: apr_sockaddr_info_get() failed for server
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
... waiting apache2: apr_sockaddr_info_get() failed for server
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
root@server:~# cat /etc/hostname
iSell
root@server:~# hostname
server
root@server:~# hostname -f
hostname: Name or service not known
root@server:~# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain
108.1.*.* eins
root@server:~#
Note:the two asterisk at the end of ip in /etc/hosts are added by me at the time of posting. Note2: let's say my domain name is www.xyz.net
I would like to know exactly what i must do step by step please. Thank's very much!
Upvotes: 8
Views: 45926
Reputation: 6047
Add the ServerName to /etc/apache2/apache.conf
:
ServerName [yourservername or localhost]
and load the Apache config:
service apache2 restart
Upvotes: 2
Reputation: 79
$ apache2 -v
$ echo "ServerName\t`cat /etc/hostname`" | sudo tee -a /etc/apache2/apache2.conf
Upvotes: 2
Reputation: 31
1) Edit the file: vi /etc/apache2/apache.conf 2) Write in the last line (to see your-machine-name write: cat /etc/hostname): ServerName your-machine-name 3)service apache2 reload
enjoyit!
Upvotes: 2
Reputation: 21
Edit you hosts file
sudo nano /etc/hosts
look if you ip 127.0.1.1 as the good name of the server
127.0.1.1 srv-web-01
and restart your Apache
sudo service apache2 restart
Upvotes: 2
Reputation: 359
Just edit the blank httpd.conf for Apache with the following:
sudo gedit /etc/apache2/httpd.conf
Add the line:
ServerName localhost
Save and quit and restart Apache:
sudo /etc/init.d/apache2 restart
That will take care of it.
Upvotes: 22