CentOS Install Apache boot error:

Source: Internet
Author: User
Tags domain name server fully qualified domain name

Apache Boot error: Httpd.exe:Could not reliably determine the server ' s fully qualified

You may encounter Apache startup error when configuring your computer for Apache development environment: Httpd.exe:Could not reliably determine the server ' s fully qualified domain name , using 192.168. X. x for ServerName, this error will also have output in Error.log.

# ServerName gives the name and port, the server uses to identify itself.
# This can often is determined automatically, but we recommend you specify
# It explicitly to prevent problems during startup.
#
# If Your host doesn ' t has a registered DNS name, enter its IP address here.
#
#ServerName www.xizhilang.com:8080
# Add the following line to the httpd.conf file to avoid this startup error
ServerName localhost:8080

As the comment recommends, the name of the machine is specified directly as your IP address, and the error reported is because the domain name server is not configured or the domain name server could not find the address of the domain name. The name of the Apache service is designated as the local IP address, there is no need to go through the DNS server to get the IP address of the machine, and the special address of localhost is a built-in configuration implemented by the DNS itself, so here with localhost can also be done locally to convert the address.

I try to modify the local hosts file and the httpd.conf file, but also to avoid the occurrence of the error, the specific method is as follows.

First, modify the httpd.conf. config file to add the item in the configuration file configuration ServerName xizhilang.com:8080, which is the one above.

# ServerName gives the name and port, the server uses to identify itself.
# This can often is determined automatically, but we recommend you specify
# It explicitly to prevent problems during startup.
#
# If Your host doesn ' t has a registered DNS name, enter its IP address here.
#
#ServerName www.xizhilang.com:8080
ServerName xizhilang.com:8080

Then, modify the Hosts file, the location of the hosts file is "system drive letter: \windows\system32\drivers\etc\hosts", after opening in the last add two lines, configured as follows:

# For example:
#
# 102.54.94.97 rhino.acme.com # source Server
# 38.25.63.10 x.acme.com # x client Host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
#:: 1 localhost
# Add the following two lines to resolve the xizhilang.com domain name to the cost address
127.0.0.1 xizhilang.com
:: 1 xizhilang.com

After the addition, open Apache, OK, warning message no longer appear!

CentOS Install Apache boot error:

Related Article

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.