Problems with multiple level two domain names with Wamp

Source: Internet
Author: User

[Revised 2013-11-03]
I tested it myself, moving the virtual subdirectory out of the Wamp\www directory, such as creating a new directory on another disk to store subdirectories, which seems to solve the problem, but still don't know why.

Environment: Windows Server 2003
Software: Wamp version 2.4

Current status: Server Normal, Web extranet accessible (via 8081 port), accessible via IP and domain name

Requirements: I have many subdomains, want to do virtual directory, such as wamp\www\test\ corresponding domain name test.abc.com
Question: Now open test.abc.com:8081 directly is the WWW directory, displaying the web version of the folder directory
(Note: I am using the 8081 port)

My process: 1. Baidu Google to find a few tutorials, configuration: Apache conf, configured as follows: opened the VirtualHost load:

# Virtual hostsInclude conf/extra/httpd-vhosts.conf

2. Then add the virtual directory:

Note the original

#
  
   
    
       #ServerAdmin webmaster@dummy-host.example.com    #DocumentRoot "c:/Apache24/docs/dummy-host.example.com"    #ServerName dummy-host.example.com    #ServerAlias www.dummy-host.example.com    #ErrorLog "logs/dummy-host.example.com-error.log"    #CustomLog "logs/dummy-host.example.com-access.log" common#
  
   #
  
   
    
       #ServerAdmin webmaster@dummy-host2.example.com    #DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"    #ServerName dummy-host2.example.com    #ErrorLog "logs/dummy-host2.example.com-error.log"    #CustomLog "logs/dummy-host2.example.com-access.log" common#
  
   

Add a new virtual directory


  
   
    
    Options Indexes Order allow,deny Allow from all
  
   
  
   
    
    DocumentRoot d:/wamp/www/test/ ServerPath  d:/wamp/www/test/ ServerName test.abc.info
  
   

The result opens or:

This is the situation, I hope you can help me see

This issue has been closed due to:

Reply content:

[Revised 2013-11-03]
I tested it myself, moving the virtual subdirectory out of the Wamp\www directory, such as creating a new directory on another disk to store subdirectories, which seems to solve the problem, but still don't know why.

Environment: Windows Server 2003
Software: Wamp version 2.4

Current status: Server Normal, Web extranet accessible (via 8081 port), accessible via IP and domain name

Requirements: I have many subdomains, want to do virtual directory, such as wamp\www\test\ corresponding domain name test.abc.com
Question: Now open test.abc.com:8081 directly is the WWW directory, displaying the web version of the folder directory
(Note: I am using the 8081 port)

My process: 1. Baidu Google to find a few tutorials, configuration: Apache conf, configured as follows: opened the VirtualHost load:

# Virtual hostsInclude conf/extra/httpd-vhosts.conf

2. Then add the virtual directory:

Note the original

#
  
   
    
       #ServerAdmin webmaster@dummy-host.example.com    #DocumentRoot "c:/Apache24/docs/dummy-host.example.com"    #ServerName dummy-host.example.com    #ServerAlias www.dummy-host.example.com    #ErrorLog "logs/dummy-host.example.com-error.log"    #CustomLog "logs/dummy-host.example.com-access.log" common#
  
   #
  
   
    
       #ServerAdmin webmaster@dummy-host2.example.com    #DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"    #ServerName dummy-host2.example.com    #ErrorLog "logs/dummy-host2.example.com-error.log"    #CustomLog "logs/dummy-host2.example.com-access.log" common#
  
   

Add a new virtual directory


  
   
    
    Options Indexes Order allow,deny Allow from all
  
   
  
   
    
    DocumentRoot d:/wamp/www/test/ ServerPath  d:/wamp/www/test/ ServerName test.abc.info
  
   

The result opens or:

This is the situation, I hope you can help me see

This way.

#httpd.conf里的 default serverNameVirtualHost *:80
  
   
    
       ServerName localhost    DocumentRoot "D:\wamp\www"    ServerAdmin yoo@gay.cn
  
   Include conf/vhost/*-vhost.conf
#这个是对应的  /vhost/project1-vhost.conf
  
   
    
       DocumentRoot   "D:\wamp\www\project1"     ServerName     project1.com
  
   


  
   
    
    #端口号不用改    ServerAdmin    mail@domain.com #这里是你的网站管理员的邮箱,一般随便设置一个    DocumentRoot "c:/wamp/www/domain.com" #这里是你的网站根目录 对应HOSTS文件中要添加对应的IP跟域名    ServerName domain.com  #这里是你的域名
  
   

Proposed to switch to XAMPP, now Wamp development is a little less to force.

Your first step is correct, the following in fact in the httpd-vhosts.conf this file there are examples, you uncomment one, change to their own domain name, the hosts must add the domain name you set.

  • 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.