Avatar of willa666
Flag for United States of America asked on

Starting httpd

I get this error when i start apache

Starting httpd: httpd: Could not determine the server's fully qualified domain name, using for ServerName
Apache Web Server

Avatar of undefined
Last Comment

8/22/2022 - Mon

1. You haven't configured the apache properly - You should configure it with some real servername
2. But if don't want, then configure the /etc/hosts with following line       localhost.localdomain localhost

Hi ravenpl

I cant find a block in the httpd.conf for /etc/hosts

Edit /etc/hosts, make sure there is the line I provided.
Your help has saved me hundreds of hours of internet surfing.

I cant find the /etc/hosts block in my httpd.conf

[I cant find the /etc/hosts block in my httpd.conf]

And you wont

Here's what ravenpl told you:

1) "You haven't configured the apache properly - You should configure it with some real servername"

To do this open /etc/apache/httpd.conf and look for "#ServerName". Change this to ServerName  <www.yourdomain.name> (note yourdomain.name is a example and should be your real domain name)

2) "OR" configure "/etc/hosts" (this is a totally different file in your /etc/ directory) and add  localhost.localdomain localhost (only if it doesn't exist)

once one of these (or both) are done, start apache

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question