When you have not set your server's hostname properly, you will see some of the security and verification processes are not right. To fix this issue, you can set your Hostname easily.
For linux distributions similar to Ubuntu:
hostnamectl set-hostname server.localhost
For linux distributions similar to CentOS:
hostname server.localhost
We have set hostname server.localhost in the example shown in above. You can change it to anything you want just looks similar shown in below.
myserver.domainname.com
server.domain.net
example.mylocalhost
localhost
..
Lets add newly defined hostname to network configuration. Open hosts file with an editor such like nano and add hostname refers to 127.0.0.1
Open hosts file with an editor such like nano:
nano /etc/hosts
127.0.0.1 server.localhost
sudo nano /etc/sysconfig/network
Add or modify existing HOSTNAME data shown in below.
HOSTNAME=server.localhost
/etc/init.d/network restart