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: