Avatar of willa666
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 127.0.0.1 for ServerName
Apache Web Server

Avatar of undefined
Last Comment
kenfcamp

8/22/2022 - Mon
ravenpl

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
127.0.0.1       localhost.localdomain localhost
willa666

ASKER
Hi ravenpl

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

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

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

[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 127.0.0.1  localhost.localdomain localhost (only if it doesn't exist)

once one of these (or both) are done, start apache
ASKER CERTIFIED SOLUTION
kenfcamp

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
or
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