Httpd:could not reliably determine the server when you start Apache

Source: Internet
Author: User
Keywords apache determine reliably
Tags aliyun apache apache2 apachectl centos domain file html

Occurs when Apache is started

[Root@centos apache2]#/usr/local/apache2/bin/apachectl start
Httpd:could not reliably determine the server ' s fully qualified domain http://www.aliyun.com/zixun/aggregation/11696. HTML ">name, using 121.10.40.155 for ServerName

Now provide a workaround for the problem

1 access to the Apache configuration file directory: (depending on the individual installation situation and different)

[Root@centos/]# cd/etc/httpd//The directory where I install the configuration file is/etc/httpd

2 Edit httpd.conf file, search "#ServerName", add ServerName localhost:80

[Root@centos httpd]# ls
CONF.D Extra httpd.conf Magic mime.types Original

[Root@centos httpd]# VI httpd.conf

#
# ServerName gives the name and port that's 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 ' t have a registered DNS name, enter its IP addresses here.
#
#ServerName www.example.com:80
Change to:

ServerName localhost:80

3 Restart Apache.

[Root@centos httpd]#/usr/local/apache2/bin/apachectl Restart

OK, the boot is successful!

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.