how to config Apache for many domain name

2010-09-16  来源:本站原创  分类:Development  人气:199 

ServerAlias: Server alias in Apache can be used to set the virtual host computer is a domain name, you can resolve the domain name for receiving pan. Specific settings as follows:

First, to set the virtual host multiple domain names to receive

A virtual host will often receive more than one domain name resolution, such as: a virtual host to simultaneously introduce sanywork.cn, 51684.com two domain names, or two secondary domain name, such as: www.sanywork.cn, www1.sanywork. cn, for this situation, you can easily do with ServerAlias open apache's configuration file: httpd.conf, set in the host code:
<VirtualHost 192.168.1.12>
ServerName "sanywork.cn" # default domain name;
ServerAlias 51684.com www1.sanywork.cn # different domain names separated by spaces;
DocumentRoot "D: \ wwwroot \ sanywork.cn"
<Directory "D:\wwwroot\sanywork.cn">
Options Indexes FollowSymLinks
AllowOverride all
</ Directory>
</ VirtualHost>

Save httpd.conf file, restart apche to take effect.

2, for receiving pan Domain Name

A virtual host is able to receive pan-Domain Name, and it is set by SeverAlias options, by setting this option not only can receive two pan-Domain Name, also can receive three, four Pan-domain name resolution, specific settings are as follows:
<VirtualHost 192.168.1.12>
ServerName "sanywork.cn" # default domain name;
ServerAlias *. sanywork.cn # pan with * that name, if you want to receive three pan-Domain Name, can be written like this: *. my.sanywork.cn;
DocumentRoot "D: \ wwwroot \ sanywork.cn"
<Directory "D:\wwwroot\sanywork.cn">
Options Indexes FollowSymLinks
AllowOverride all
</ Directory
</ VirtualHost>

Save httpd.conf file, restart apche to take effect.

相关文章
  • how to config Apache for many domain name 2010-09-16

    ServerAlias: Server alias in Apache can be used to set the virtual host computer is a domain name, you can resolve the domain name for receiving pan. Specific settings as follows: First, to set the virtual host multiple domain names to receive A virt

  • Apache + Jboss add domain forwarding load balancing 2010-05-27

    Apache2.2 + jboss4.2.3 Said first load balancing httpd.conf to Listen 8080 1, modify the E: \ jboss-4.2.3.GA \ server \ default \ deploy \ jboss-web.deployer server.xml This is one of the server changes the results of the ah <Connector port = "800

  • Apache server binding domain to the specified directory under way 2010-09-27

    First, get dns, this is the key ... apache virtual host to have to use the analytical dns Win9x in the windows directory in the file, the file name may be hosts.sam; Win2K and later operating systems this file is located in WINNT \ system32 \ drivers

  • how to config apache's virtual host 2010-09-16

    Setting up Apache virtual hosts First, IP-based virtual hosts This approach requires setting an IP alias on the machine, like the above example, the network card in a machine to bind multiple IP addresses to service multiple virtual hosts. If the mac

  • Remember my first configure Apache server domain name resolution and domain name resolution process of the Pan- 2010-03-31

    Configuring apache for multiple domain name resolution, need to use the following things: C: \ WINDOWS \ system32 \ drivers \ etc \ hosts (DNS domain name resolution files) Apache2.2.11 \ conf \ httpd.conf Apache2.2.11 \ conf \ extra \ httpd-vhosts.c

  • ucenter installation and configuration (apache.php.mysql) 2010-10-07

    Using apache + php + mysql installation ucenter 1, download apache (apache_2.2.4-win32-x86-no_ssl.msi) Download: (Http://www.filewatcher.com/m/apache_2.2.4-win32-x86-no_ssl.msi.4447744.0.0.html) 2, install apache In NetWork Domain and server Name two

  • How to add a web application domain authentication 2010-07-11

    A large company's internal applications, may be the face of this demand, when an application deployment is completed, the user and role management hopes that this machine's domain account auto logon and identification. In this way, the user's informa

  • How a web application to join the domain authentication 2010-07-11

    A large company's internal applications, may be the face of this demand, when an application deployment is completed, the user and role management hopes that this machine's domain account auto logon and identification. In this way, the user's informa

  • APACHE virtual host error causes 2010-08-12

    APACHE virtual host error causes March 22, 2010 [Warn] NameVirtualHost *: 0 has no VirtualHosts Reason: The namevirtualhost command tells Apache that you will use VirtualHost boxes on a specific IP address. This command is needed only once for each I

  • Install Apache & Passenger 2010-08-14

    How to Install Apache & Passenger 1. Install Apache sudo apt-get install apache2 2. Install Passenger sudo gem install passenger 3. Install Apache Passenger Module sudo passenger-install-apache2-module 4. Copy some information After Install The Apach

  • apache tomcat integration of multi- 2011-05-29

    1. Software for 1.1 Integrated software inventory apache-httpd: Version 2.2.19, access to port 80 mod-jk: Version 1.2.31 tomcat1: Version 7.0, visit the domain name http://tomcat1.com tomcat2: Version 7.0, visit the domain name http://tomcat2.com 1.2

  • Great summary of examination questions java interview Pen 2010-03-29

    Great summary of examination questions java interview Pen Great summary of examination questions java interview Pen First, to talk about the final, finally, finalize the difference. Most frequently asked. Second, Anonymous Inner Class (anonymous inne

  • Apache-based servers 2010-08-30

    Introduction Among all the possible servers, Apache-based server is the most flexible, although configured a bit complex, but other servers do not provide the facilities: WebDAV The Apache based Subversion server uses the WebDAV protocol which is sup

  • Using Web Server Plug-Ins with WebLogic Server as revese proxy 2010-11-15

    I was assigned to lead a team to develop single sign-on project for a telecommunication company. Oracle and my company would implement the whole project together. Firstly, I was asked to install weblogic v10.3.1 + ADF v11.1.x + oracle http server (Fu

  • Extended Spring - use the Annotation will be injected into the Bean in the allocation of resources 2010-12-19

    From http://www.blogjava.net/max/archive/2009/11/20/303112.html extended Spring - use the Annotation will be injected into the allocation of resources in a long time not updated BLOG Bean, and these days often have friends message or EMAIL care or en

  • Sphinx 使用记录 2014-02-01

    工作中需要使用 sphinx 来实现中文全文搜索,最后选择了 sphinx 这个工具,于是记录一下操作步骤. 前言 下面的表纯属文章虚构,由于配置内容较多,部分省略,具体可以参考官方文档. 想吐槽一句:编译安装真浪费时间, configure && make && make install 一个软件就需要几十分钟.我这安装四五个,几个小时就没了. 安装 安装前需要先去官网下载源码. 目前最新版本是 2.2.5-release,点击下载即可. 当然,如果你想直接在命令行下载,

  • weblogic to modify the port 2008-09-07

    weblogic default port is 7001, if you want to change the port, then in the config.xml file to add <listen-port> 80 </ listen-port>. Location is as follows: <server> <name> AdminServer </ name> <listen-port> 80 </ lis

  • Transfer java written knowledge points 2008-12-04

    Java written test of knowledge transfer point from http://www.blogjava.net/javawin/archive/2010/03/15/315448.html HashMap & Hashtable: Map interface implementation class will be the only key is mapped to a particular value on: <key,value>. HashM

  • JAVA Programmer Interview - Sunflower Collection 2010-09-23

    What are the characteristics of object-oriented aspects of 1. Abstract: Abstract is to overlook a theme with the current target 2. Unrelated to those aspects, 3. To more fully pay attention to the current target 4. Related aspects. Abstract is not 5.

  • Php development environment under Windows XP build 2010-12-16

    1 Release Notes Apache version: apache 2.2.4 Php version: php 5.2.3 Mysql version: mysql 5.1.19 Apache, Php5 and store the best Php file documents in the same directory level 2 apache download and installation 2.1 Download the following link to downl