modolabs / Kurogo-Mobile-Web

Kurogo is a PHP framework for delivering high quality, data driven customizable content to a wide range of mobile devices. Its strengths lie in the customizable system that allows you to adapt content from a variety of sources and easily present that to mobile devices from feature phones, to early generation smart phones, to modern devices and tablets
http://kurogo.org
GNU Lesser General Public License v2.1
198 stars 99 forks source link

Allow setting the ACTIVE_SITE via the environment. #65

Open adamfranco opened 12 years ago

adamfranco commented 12 years ago

This patch allows Kurogo to serve multiple sites from the same code directory where the active-site selection is configured by something beyond the limited subpath structure of MultiSite mode.

One example enabled by this patch is to serve different Kurogo sites for each VirtualHost on the machine:

<VirtualHost *:80>
    ServerName students.example.edu
    DocumentRoot /var/www/kurogo/www/

    SetEnv ACTIVE_SITE Students
</VirtualHost>

<VirtualHost *:80>
    ServerName faculty.example.edu
    DocumentRoot /var/www/kurogo/www/

    SetEnv ACTIVE_SITE Faculty
</VirtualHost>

This patch does not interfere with normal single-site operation or with MultiSite mode. See the additions to doc/mw/multisite.rst in this patch for more detailed configuration instructions.

akinspe commented 11 years ago

Options similar to this will be part of our next release