How to bind multiple instances with different domain names to the same apache virtual directory

Source: Internet
Author: User
Tags bind php tutorial

How to bind multiple instances with different domain names to the same apache virtual directory

To bind multiple domain names to the same directory, you must use the serveralias method. Next we will use www.111cn.net as an instance,

Namevirtualhost *: 80
<Virtualhost *: 80>
Servername web-demo
Serveralias www.111cn.net 111cn.net
Documentroot "x:/www/htdocs"
</Virtualhost>
<Directory "x:/www/htdocs">
Options followsymlinks includesnoexec indexes
Directoryindex index.htm index.html index. php tutorial
Allowoverride none
Order deny, allow
Allow from all
</Directory>

Note: domain names are separated by spaces. Otherwise, the binding will fail. Restart your apache server and KKO.

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.