Bismillah…
This error usually appear when we install apache on our VPS. I will show you, steps how to solve it.
1. Find file httpd.conf in folder /etc/
find /etc/ -name httpd.conf
We will find the location of httpd.conf
/etc/httpd/conf/httpd.conf
The location could be different from my sample above.
2. Open file httpd.conf
vi /etc/httpd/conf/httpd.conf
3. Add code below
ServerName localhost
4. Save changes httpd.conf
5. Restart apache service
sudo service httpd restart
You can open this link for complete vi command.
Thank You. Have a nice day