DocumentRoot "D:/tuolarapp" ServerName "localhost.tuolarapp.com"
Or the detailed points are as follows:
DocumentRoot "D:/tuolarapp" ServerName "localhost.tuolarapp.com" options Indexes Followsymlinksserveralias 1.com *.2.comerrorlog Logs/www.eachbrand.com-error_logcustomlog logs/ Www.eachbrand.com-access_log commonallowoverride allorder allow,denyallow from all
Then save and restart Apache so that when I enter localhost.tuolarapp.com in the browser, it will automatically parse the site into the D:/tuolarapp directory. This input is more convenient, the key self-feeling will be better.
for each of the above configuration elements do the following description:
: localhost for the site domain name, 80 port can not write, if you change to another port to write on, but also to modify the httpd.conf in the listening port number: Listen 80
ServerName:Website domain name, ibid., must fill in;
DocumentRoot:Website program main directory, must fill in;
Options Indexes followsymlinks:Display directory list, if you want to set the security point can be indexes removed, do not display directory list, not necessary;
Alias:can be accessed through multiple domain names;
errorlog:Where the error log file is stored;
Customlog:Access log file storage location;
Resinconfigserver:Resin Server listening port, I here is the Local: 127.0.0.1, if there are more than one machine as a server, modified to the corresponding IP address can be;
The above will be the virtual host configuration completed, a Web site corresponding to a Tag
This completes the XAMPP implementation of the multi-site application.
What if you want to run the site under a different port?
Very simple: In the "httpd.conf" main configuration file, set up multiple ports, such as listen 8081
How to use XAMPP to build a virtual host running PHP, I believe that later encountered similar problems, it will not be difficult to everyone, I hope you will like this article.