Virtual Host under Windows

Source: Internet
Author: User

1. wondows XP + apmserv 5.2.6 Port 8088

2.httpd.config file

1. ServerRoot "D:/apmserv/apmserv5.2.6/apache"

Listen 8088

ServerName 127.0.0.1:8088

DocumentRoot "d:/apmserv/apmserv5.2.6/www/"

(Original text unchanged)

2. Either put a few <virtualhost> tags in the D:\APMServ\APMServ5.2.6\Apache\conf\apmserv\vhost.conf file (who is the default virtual host before)

be included in the httpd.config, or write them all in Httpd.config (if more virtual hosts can be modified as they are added)

namevirtualhost *:8088<virtualhost *:8088> ServerName www.test.com Serveralias *.test.com documentroot "d:/apmserv/apmserv5.2.6/www/test" <directory "D:/APMServ/APMServ5.2.6/www/ Test "> Options followsymlinks includesnoexec Indexes directoryindex index.html index.htm default.htm index.php defaul t.php index.cgi default.cgi index.pl default.pl index.shtml allowoverride None Order deny,allow allow from all </Dire Ctory></virtualhost>namevirtualhost *:8088<virtualhost *:8088> ServerName www.testone.com Serveralias *.testone.com documentroot "D:/apmserv/apmserv5.2.6/www/testone" <directory "D:/APMServ/APMServ5.2.6 /www/testone "> Options followsymlinks includesnoexec Indexes directoryindex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml allowoverride None Order Deny,Allow allow FR Om all </directory></virtualhost> 

3.c:\windows\system32\drivers\etc\hosts file opens with a text editor add below (if more virtual hosts can be modified as they are added)

127.0.0.1 localhost
127.0.0.1 testone.com
127.0.0.1 www.testone.com
127.0.0.1 testtwo.com
127.0.0.1 www.testtwo.com

4. The machine opens any browser input URL www.test.com or www.testone.com will show d:/apmserv/apmserv5.2.6/www/test or "d:/apmserv/apmserv5.2.6/ The default page in Www/testone (index.php or index.html ...)

Virtual Host under Windows

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.