On 08.10.2007, at 15:02, Kris Wallsmith wrote:
>
> Hi Lukas,
>
> I typically use the following front controller. This allows me to
> define the bootstrap settings from w/i my Apache configuration,
> preventing people from accessing the site in an alternate environment.
>
> Hope that helps!
> Kris
>
> <pre><code>
> <?php
>
> /** @version SVN: $Id$ **/
>
> define('SF_ROOT_DIR', realpath(dirname(__FILE__).'/..'));
> define('SF_APP', isset($_SERVER['SF_APP']) ?
> $_SERVER['SF_APP'] : 'frontend'));
> define('SF_ENVIRONMENT', isset($_SERVER['SF_ENVIRONMENT']) ?
> $_SERVER['SF_ENVIRONMENT'] : 'prod');
> define('SF_DEBUG', isset($_SERVER['SF_DEBUG']) ? (bool)
> $_SERVER['SF_DEBUG'] : false);
>
> require_once
> (SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIR
> ECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
>
> sfContext::getInstance()->getController()->dispatch();
>
> </code></pre>
yeah .. that is maybe a cleaner approach. i never like relying all
too much on vhost settings, mainly because i think its a pita to have
to setup a vhost just for development purposes. then again, my
convoluted hack is much worse i guess.
since i am not much of a sys admin (and i assume others would have
the same issue), could you maybe throw up your solution including a
sample vhost setting on the wiki? or send me the vhost example and
then i will take care of adding it there ..
regards,
Lukas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---