Run the multi-instance Zend framework in Apache

Source: Internet
Author: User

Previously, Zend framework was configured in Apache in the simplest way, that is, only one Zend framework project is running at a time. To debug another project, you must modify the Apache configuration file, it was very troublesome. Later I found the virtualhost configuration on the Internet so that multiple zendframework projects can run simultaneously. Well, let's talk about the specific configuration below. My goal is to run two zendframework projects simultaneously under Apache. The two Zend framework projects are:

1. XXX project, Location: D:/project/php_wp/XXX/

2. YYY project, Location: D:/project/php_wp/YYY/

  1. Open the Apache configuration file to httpd. conf and comment out the following three options.
    # Serveradmin
    # Servername
    # DocumentRoot
  2. Find the line # include CONF/extra/httpd-vhosts.conf and remove '#' at the beginning of the line
  3. Find
    # Loadmodule proxy_module modules/mod_proxy.so
    # Loadmodule proxy_ajp_module modules/mod_proxy_ajp.so
    Remove the '#' at the beginning of the two rows
  4. Disable DocumentRoot
  5. Shield all content in the <directory "D:/program files/Apache Software Foundation/apache2.2/htdocs"> label.
  6. Open the/CONF/extra/httpd-vhosts.conf file in the Apache directory and modify it as follows:
    Namevirtualhost *: 80
    <Virtualhost *: 80>
    Serveradmin Xxx@gmail.com
    Servername Www.xxx.com
    DocumentRoot" D:/project/php_wp/xxx /Public"
    Errorlog "log/xxx-error.log"
    Customlog "logs/xxx-access.log" common

    <Directory "D:/project/php_wp/xxx /Public ">
    Directoryindex index. php
    Options indexes followsymlinks
    AllowOverride all
    Order allow, deny
    Allow from all
    </Directory>
    </Virtualhost>

    <Virtualhost *: 80>
    Serveradmin Yyy@gmail.com
    Servername Www.yyy.com
    DocumentRoot" D:/project/php_wp/yyy /Public"
    Errorlog "log/yyy-error.log"
    Customlog "logs/yyy-access.log" common

    <Directory "D:/project/php_wp/yyy /Public ">
    Directoryindex index. php
    Options indexes followsymlinks
    AllowOverride all
    Order allow, deny
    Allow from all
    </Directory>
    </Virtualhost>

  7. Modify the C:/Windows/system32/Drivers/etc/hosts file and add two lines later
      127.0.0.1 www.xxx.com
      127.0.0.1 www.yyy.com
  8. Restart Apache,

Open your browser and enter www.xxx.com and www.yyy.com. Have you seen that both Zend framework projects are running.

 

PS: Finally, I want to express my anger at the csdn blog. The speed is too slow and I want to insertCodeOnce you press Ctrl + Z, you only have to regret it. Which of the following is a useful blog migration tool?

 

 

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.