Hostname Issue

General support questions
Post Reply
cleetusantony
Posts: 17
Joined: 2017/11/22 05:13:39

Hostname Issue

Post by cleetusantony » 2017/12/12 12:54:33

Hello All,

For some reason my server's hostname is keep on changing.
Attached the file states the issue.
Changed the hostname by hostname commnad and later its going back to some strange hostname associated to the name of my ISP.
Please see the file.

This issue gives me trouble in my httpd settings as well.

[root@localhost ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Warning: DocumentRoot [/var/www/html/complaints] does not exist
httpd: apr_sockaddr_info_get() failed for 237-132.io-global.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]


Can anyone tell me how I can fix the hostname as I wanted and where exactly should go and edit things.

Regards
Cleetus
Attachments
hostname.txt
(735 Bytes) Downloaded 85 times

billwest
Posts: 154
Joined: 2006/11/19 10:50:31
Location: Perth, Western Australia

Re: Hostname Issue

Post by billwest » 2017/12/13 01:44:36

Put the hostname in

/etc/hostname


You may also want to put an entry in

/etc/hosts

I you are running a webserver, perhaps set up DNS?

cleetusantony
Posts: 17
Joined: 2017/11/22 05:13:39

Re: Hostname Issue

Post by cleetusantony » 2017/12/13 12:11:29

Changed hostname by using hostname command and changed in /etc/hosts
Still the name changes

billwest
Posts: 154
Joined: 2006/11/19 10:50:31
Location: Perth, Western Australia

Re: Hostname Issue

Post by billwest » 2017/12/13 12:15:38

Put the hostname in

/etc/hostname

ie create this file if it doesn't exist.


Restart if needed.

Post Reply