首页 > 服务与支持 > 技术文档 > 同一IP邦定多个域名

同一IP邦定多个域名

同一IP邦定多个域名

 

<VirtualHost xxx.xxx.xxx.xx:80>

ServerAdmin webmaster@dummy-host.example.com

DocumentRoot /home/hprice/html

ServerName hprice.net

ErrorLog logs/hprice.com-error_log

</VirtualHost>

<VirtualHost xxx.xxx.xxx.xx:80>

ServerAdmin webmaster@dummy-host.example.com

DocumentRoot /home/hprice/html

ServerName www.hprice.cn

ErrorLog logs/hprice.com-error_log

</VirtualHost>

<VirtualHost xxx.xxx.xxx.xx:80>

ServerAdmin webmaster@dummy-host.example.com

DocumentRoot /home/hprice/html

ServerName www.hprice.com.cn

ErrorLog logs/hprice.com-error_log

</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:80>

ServerAdmin webmaster@dummy-host.example.com

DocumentRoot /home/hprice/html

ServerName www.hprice.net

ErrorLog logs/hprice.com-error_log

</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:80>

ServerAdmin webmaster@dummy-host.example.com

DocumentRoot /home/hprice/html

ServerName hprice.com.cn

# Use name-based virtual hosting.

#

NameVirtualHost xxx.xxx.xxx.xxx

#

# NOTE: NameVirtualHost cannot be used
without a port specifier

# (e.g. :80) if mod_ssl is being used, due
to the nature of the

# 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 xxx.xxx.xxx.xxx: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>

 



go top