The first has precedence, perhaps you need a NameVirtualHost directive

Source: Internet
Author: User

Error Message 1:

Starting httpd: [Fri May 19 11:49:42 2011] [warn] VirtualHost 127.0.0.1: 80 overl
Aps with VirtualHost 127.0.0.1: 80, the first has precedence, perhaps you need
NameVirtualHost directive

This indicates that the vm name is not enabled, and NameVirtualHost is not enabled, as shown below:

# Add here ~~, Then you can add any number of virtual hosts.

NameVirtualHost 192.168.8.37: 80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (E.g.: 80) if mod_ssl is being used, due to the nature of
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# Server name.
#
# <VirtualHost *: 80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot/www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#/VirtualHost>


<VirtualHost *: 80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot/var/www/html
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost 192.168.8.37: 80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot/var/www/html
ServerName XXX.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

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.