1

I'm Having Issue starting Httpd Service since it's given the following Error:

httpd[5328]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::f03c:91ff:fed5:adf4. Set the 'ServerName' directive globally to suppress this message

My Hostname is AmericaN

So what to do in that case?

The output of /etc/hosts is :

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
  • 2
    It isn't an error, simply a notice. As the message says you'd need to set ServerName in the main config (not in a vhost) and it should be a FQDN that can be looked up via DNS or /etc/hosts – ivanivan May 16 '17 at 16:38
  • @ivanivan that's the output of my /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 so what shall i do? – αԋɱҽԃ αмєяιcαη May 16 '17 at 16:41
2

The warning message is telling you exactly what you need to do to resolve it: Add a ServerName directive in your Apache configuration for at least one of each VirtualHost attached to each interface for which there is a Listen directive.

  • I'm Not installed Apache, I'm using httpd only. – αԋɱҽԃ αмєяιcαη May 16 '17 at 17:32
  • httpd is Apache in nearly all cases, and the message you cite is very typical of Apache. – DopeGhoti May 16 '17 at 17:34
  • so could you please explain for me what shall i do exactly if you don't mind ! – αԋɱҽԃ αмєяιcαη May 16 '17 at 17:48
0

In first i were running httpd by " yum install httpd " and then starting it By " service httpd start "

but once i changed the hostname to be different than default and set it to AmericaN and configured the DNS to 8.8.8.8 8.8.4.4 then i lost access on apache and were not able to access my public ip using browser.

so after doing some research i found a solution for my issue by allowing firewalld to recognize my traffic on port 80/443 http/https using the following command :

sudo firewall-cmd --add-service=http --permanent && sudo firewall-cmd --add-service=https --permanent

  • forgot to mention that in case if anyone wanna resolve the error MSG by httpd/apache, then you need to go to nano /etc/httpd/conf/httpd.conf and uncomment ServerName and make it to be ServerName localhost – αԋɱҽԃ αмєяιcαη May 16 '17 at 19:25
0

You just need to put ServerName localhost inside as well as outside your VirtualHost tags.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.