Apache Configure local domain name

Source: Internet
Author: User


Open the Apache installation directory and locate the httpd.conf file, removing the # number in front of the following two lines of text, respectively.
LoadModule Vhost_alias_module modules/mod_vhost_alias.so
Remove # means enable Apache's virtual host feature.
Include conf/extra/httpd-vhosts.conf

Getting rid of this line means importing the virtual host configuration from the conf/extra/httpd-vhosts.conf file.

Then the httpd-vhosts.conf file in the extra directory

<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "d:/wamp/www/"
ServerName localhost
Serveralias localhost
Errorlog "Logs/localhost-error_log"
</VirtualHost>
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "d:/wamp/www/web/"
ServerName test.com (main domain)
Serveralias *.test.com (the server alias here can support Pan-resolution, that is, all subdomains can be resolved to bind to the virtual host)
Errorlog "Logs/localhost-error_log"
</VirtualHost>

2. Local Service Setup
01. Determine the local IP

    

02. Configure the route map

  

03. Determine the routing ip

  

Apache Configure local domain name

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.