Appserv setting up virtual host and domain name connection

Source: Internet
Author: User

1: Install the AppServ2.5.9 software, the official website is: http://www.appservnetwork.com/, 2.59 is: http://nchc.dl.sourceforge.net/sourceforge/ Appserv/appserv-win32-2.5.9.exe is an English software, but you can choose gbk-gb2312 encoding for installation.

2: Modify the Hosts file for this machine as follows: C:\WINDOWS\system32\drivers\etc\hosts

Example:

127.0.0.1 localhost

127.0.0.1 www.phpcms.com

  

3: Open the Appserv installation directory, find the httpd.conf file, respectively, remove the following two lines of text in front of the # number.

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

  

4: Open the extra directory in the httpd-vhosts.conf file, whatever, directly at the bottom of the file to add their own virtual host information. as shown below.

Each is given an administrator mailbox, indicating the root directory of this site, domain name, and error log storage location. Note that the directory interval is best used/rather than \.

                     

<virtualhost *:80>

ServerAdmin [email protected]

DocumentRoot E:/appserv259/www/phpcms

ServerName www.phpcms.com

Errorlog E:/appserv259/www/dede/error.log

Customlog Logs/dummy-host2.appservnetwork.com-access_log Common

</VirtualHost>

  

* The diagonal of the above path can be left oblique right oblique.

   

5: Will appserv Apache service restart, you can, can be in the root directory of the Web site to a index.html file, if you can see, the explanation is right.

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.