Apache subdomain name establishment

Source: Internet
Author: User
The apache subdomain name sets the local environment. the root directory set in the apache configuration file is d:/AppServ/www/. the configuration of the subdomain name is as follows, put it in the configuration file and start NameVirtualHost & nbsp; *: 80 & lt; VirtualHost & nbsp; *: 80 & gt; & nbsp; apache subdomain name settings
In the local environment, the root directory set in the apache configuration file is d:/AppServ/www/. the configuration of the sub-domain name is as follows:

NameVirtualHost *:80


    ServerName localhost
    ServerAlias localhost
    DocumentRoot D:/AppServ/www/
 
    
#AllowOverride FileInfo Options
Options None
Order allow,deny
Allow from all
    



    ServerName dede
    ServerAlias dede
    DocumentRoot D:/AppServ/www/Dede/
 
    
#AllowOverride FileInfo Options
Options None
Order allow,deny
Allow from all
    



    ServerName ikaihui
    ServerAlias ikaihui
    DocumentRoot D:/AppServ/www/ikaihui/
 
    
#AllowOverride FileInfo Options
Options None
Order allow,deny
Allow from all
    


The current situation is: both dede and ikaihui are displayed normally. if localhost is input, chrome will report this error:
Error 103 (net: ERR_CONNECTION_ABORTED): Unknown error.

IE cannot be opened.
If you delete the localhost section, the dede page will be displayed when you enter localhost. now I want to enter localhost to display index. php under the www folder normally. how can I configure it?
------ Solution --------------------
Check whether it is caused by your anti-virus or firewall.
------ Solution --------------------
Your statement is correct.
Clear the browser buffer.
That's what I wrote.
NameVirtualHost *:80


ServerName localhost
DocumentRoot /AMP/web



ServerName www.a.net
DocumentRoot /AMP/web/www.a.net



ServerName www.b.net
DocumentRoot /AMP/web/www.b.net


------ Solution --------------------
Then you can remove the Directory section.

------ Solution --------------------
Add this.
Alias/Bind directory "absolute physical path"

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.