apache虚拟主机配置一例(apache 虚拟主机配置详解)

apache虚拟主机配置一例(apache 虚拟主机配置详解)

扫码添加渲大师小管家,免费领取渲染插件、素材、模型、教程合集大礼包!

复制代码 代码如下:
fivetrees extra # cat httpd-vhosts.conf_bak
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you 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 see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use 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 may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
#<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>

分享到 :
相关推荐

电子商务网站对虚拟主机有哪些配置要求(电子商务网站对虚拟主机有哪些配置要求呢)

随着电子商务的发展。很多企业纷纷开始建设自己的电子商务网站。而很多企业用户也都会选择...

香港虚拟主机和香港服务器有什么区别(香港虚拟主机和香港服务器有什么区别吗)

香港虚拟主机和香港服务器有什么区别?对于很多站长来说香港虚拟主机和香港服务器都是用来...

vps和云服务器哪个便宜(云服务器和VPS选哪个好)

不少新手站长在做网站时,都会先看看老站长们关于选择空间的意见。不过不同的人在不同的阶...

虚拟主机带宽怎么看实际大小(虚拟主机带宽怎么看实际大小啊)

虚拟主机带宽怎么看实际大小?怎么查看虚拟主机带宽?选购虚拟主机时。带宽是很重要的一个...

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注