xotix
xotix

Reputation: 520

Symfony2 VirtualHost

Symfony2 has by default 2 environments. Dev and production.

What's you default vhost config and why? Do you point directly to app_dev.php or do you rewrite the .htaccess to redirect to it?

Do you have 2 vhosts or did you rewrite the entry point (index) to read a config to easily change environments?

On production, I'll just have one entry point and point directly to it and leave the .htaccess there.

Please post your approach since Symfony2 doesn't tell me anythign about this. It only says that we should point our vhost to the web dir.

Maybe you always add the app_dev.php part to the url? What are you doing. Tell me your experience.

I did read the other stuff here about this.

Upvotes: 1

Views: 720

Answers (1)

AlterPHP
AlterPHP

Reputation: 12717

Follow Sf2 recommandations and let your vhost point to web directory. The provided .htaccess file will automatically redirect to app.php if no index is specified, and you type app_dev.php to access dev environment...

If you want to install a vhost dedicated to dev environment, make it rewrite URL to point on app_dev.php.

Upvotes: 3

Related Questions