When apache is started, cocould not reliably determine the server's fully qualified domain name

Source: Internet
Author: User
Tags apache log fully qualified domain name

When the system starts Apache, it does not start up. Check the "Event Viewer" and some errors are reported:

The Apache service named reported the following error:
>>> Httpd.exe: cocould not reliably determine the server's fully qualified domain name, using 192.168.0.200 for servername

Go back and check the Apache Log logs/error. log. A similar error is reported.

It all means cocould not reliably determine the server's fully qualified domain name.

I analyzed it first. It seems that DNS may be queried during Apache startup to verify servername configuration. But I am using a private IP address. How can I configure it?

With a questioning attitude, I checked httpd again. in the conf file, find the segment about the servername configuration. I suddenly found that the problem has been described in detail in the comments, but I ignored it in the initial configuration.

#
# Servername gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# It explicitly to prevent problems during startup.
#
# If your host doesn' t have a registered DNS name, enter its IP address here.
#
# Servernamewww.web8cn.com: 80

So, if you are developing on a local computer, you can write as follows:

Servername 127.0.0.1: 80

 

Restart Apache to view logs without any errors. The problem is solved.

 

This is the step for me to go back and think about how to install Apache.

I found that when I started the installation, if it asked you to enter information similar to the domain name and Host Name.

If you are officially deployed, you can write the correct domain name. If you only use a private IP for development, you can write your own private IP.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.