Apache Multi-site configuration

Source: Internet
Author: User

The gbk-gb2312 encoding can be selected at installation (I use utf-8 myself).
2: Modify the Hosts file for this machine as follows:
Example:
127.0.0.1 localhost
127.0.0.1 http://www.dede.com/
127.0.0.1 http://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/dede
ServerName http://www.dede.com/
Errorlog E:/appserv259/www/dede/error.log
Customlog Logs/dummy-host2.appservnetwork.com-access_log Common
</VirtualHost>

<virtualhost *:80>
ServerAdmin[email protected]
DocumentRoot E:/appserv259/www/phpcms
ServerName http://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.

Above is the method of using the domain name.

Below is how to use the local ip+ port method.

For example, the native IP is: 192.168.0.10
How to control 80, 1000, 1001, 1002来 access to different file directories, and to achieve the purpose of multiple sites simultaneous access?

Open the installation directory for Appserv, locate the httpd.conf file, and locate the following:
Listen 80
Join:
Listen 80
Listen 1000
Listen 1001
Listen 1002

Then refer to the setting method of the virtual host. The difference is:
<virtualhost *:80> The rear port number is changed as per your requirement.


If the 403 error occurs after the completion of the httpd.conf found in the:

<directory/>
Options followsymlinks execcgi Indexes
AllowOverride None
Order Deny,allow
Deny from all
Satisfy All
</Directory>

Change to
<directory/>
Options followsymlinks execcgi Indexes
AllowOverride None
# Order Deny,allow
# Deny from all
# Satisfy All
</Directory>

Apache Multi-site configuration

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.