Local server Apache Configure domain name access

Source: Internet
Author: User

1 Open the configuration of the virtual domain name, the file is located in the Apache configuration file httpd.conf, as shown, remove the annotation

2 According to the include file path to find the virtual domain name of the configuration file, add the following code,

  code is as follows copy code

  <virtualhost *:80>
    ServerAdmin webmaster@dummy-host.admin.com
    DocumentRoot "D:/workplace/aimee/upload"    #虚拟域名指向的目录
    ServerName www.111cn.net                    # Your domain name is
    Serveralias www. Aimee.admin.com
    ErrorLog "logs/www. Aimee.admin.com_error.log "
    customlog" logs/www. Aimee.admin.com_access.log "Common
    </virtualhost>

3 If it is a Windows system, need to configure c:/windows/system32/drivers/etc/hosts(need to get administrator to run permissions)

The code is as follows Copy Code

127.0.0.1 www.111cn.net

Then restart your Apache. Configuration complete

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.