Copy Code code as follows:
Fivetrees Extra # Cat Httpd-vhosts.conf_bak
#
# Virtual Hosts
#
# If you are want to maintain multiple domains/hostnames on your
# machine can setup virtualhost containers for them. Most configurations
# Use only name-based virtual hosts so the server doesn ' t need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please, the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before your try to setup virtual hosts.
#
# with the command line option ' s ' to verify your virtual host
# configuration.
#
# use name-based virtual hosting.
#
Namevirtualhost *:80
#NameVirtualHost *:443
#
# VirtualHost Example:
# Almost any Apache directive could into a virtualhost container.
# the ' The ' the ' the ' the ' the ' virtualhost ' is used ' for all requests
# match a ServerName or serveralias in any <VirtualHost> blocks.
#
#<virtualhost 192.168.1.66>
# Rewriteengine on
# Rewritemap Lowercase Int:tolower
# Rewritemap Vhost Txt:/usr/local/apache/conf/host.txt
# Rewritecond%{http_host}!^$
# Rewritecond ${lowercase:%{http_host}| NONE} ^ (. +) $
# Rewriterule ^/(. * ...) $ ${vhost:%1 ...} /$1
#</virtualhost>
<virtualhost *:80>
Documentroot/opt/all_dir
ServerName *
</VirtualHost>
<virtualhost *:80>
Documentroot/opt/1
ServerName 1.com
</VirtualHost>
<virtualhost *:80>
Documentroot/opt/2
ServerName 2.com
</VirtualHost>
#<virtualhost *:443>
# Documentroot/home/hello
# ServerName Hello.baidu.com
#</virtualhost>