wamp2.5 (apache2.4.9+php5.5.12) about multi-site configuration

Source: Internet
Author: User

The files involved in the entire configuration are: (assuming my wamp installs D-disk)

c:/windows/system32/drivers/etc under the Hosts file

D:/wamp/bin/apache/apache2.4.9/conf/extra under the httpd-vhosts.conf

D:/wamp/bin/apache/apache2.4.9/conf under the httpd.conf

Steps:

1. Edit httpd.conf

LoadModule php5_module "D:/wamp/bin/php/php5.5.12/php5apache2_4.dll"
Phpinidir d:/wamp/bin/php/php5.5.12
Include conf/extra/httpd-vhosts.conf

Look at these three sentences, if they are # annotated, remove the # (note that the third sentence is generally commented, remove the comments after the configuration site can be opened) save.

In addition, there is a place to set up, wamp2.5 by default only allow local access, we need to do is to change the local to all can be accessed:

Find: <directory "d:/wamp/www/", find


/p>

<directory "e:/wamp/www/" > # # Possible values for the Options directive is ' None ', ' All ', # or any combin ation of: # Indexes includes followsymlinks symlinksifownermatch execcgi multiviews # # Note that "MultiViews"    Must be named *explicitly*---"Options all" # doesn ' t give it for you.  # # The Options directive is both complicated and important.    Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information.    # Options Indexes followsymlinks # # AllowOverride Controls What directives is placed in. htaccess files. # It can be ' all ', ' None ', or any combination of the keywords: # allowoverride FileInfo authconfig Limit # &NB Sp;   allowoverride all Require all granted     //Add this paragraph here to allow all access to the site # # Contro    LS who can get stuff from the this server. #    # onlineoffline Tag-don ' t remove    # Require local &NBsp;           //note here, the purpose is to disable only allow local access </Directory> 

2. Edit httpd-vhosts.conf
The third sentence of the above step is to make this file configuration function

We see 23~30 line, this is a configuration site example, you can refer to it to write the site information you want:


<virtualhost *:80>    documentroot "d:/wamp/www/demo/"//here represents the site code root directory    ServerName www.demo1.com This indicates the site URL </virtualhost><virtualhost *:80>    documentroot "d:/wamp/www/web/"    ServerName Www.demo2.com</virtualhost>


3. Edit the Hosts file

After all, our site is running on a virtual server, and we have to tell the machine the name of our service
This last step is to tell this host your site name:

This is done at the end of this document.

127.0.0.1 demo1.com

127.0.0.1 demo2.com


After the above process configuration, restart Wamp all services, in the browser input demo1.com or demo2.com
will be able to access their own site.

wamp2.5 (apache2.4.9+php5.5.12) about 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.