It is always good to set up a virtual host for your project when you are developing an application. Here is an example of two virtual hosts that I have set up for two of my projects. One called crm and one called blog and both projects are located under /Users/sfprojects/

This is what I have added to the end of my httpd.conf

# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080
# This is the configuration for your project
Listen 127.0.0.1:8080
ServerName crm
DocumentRoot "/Users/sfprojects/crm/web"
DirectoryIndex app.php
AllowOverride All
Allow from All
ServerName blog
DocumentRoot "/Users/sfprojects/blog/web"
DirectoryIndex app.php
AllowOverride All
Allow from All

Everything is pretty simple but the Symfony ignore part perhaps needs some explanation. The obvious is the cache and the log directories, no need to store them.

The vendor dir is downloaded with the

.bin/vendors install

and it also install the files in web/bundles. IMPORTANT This is only true if you add new bundles to it through the deps file and not with git directly they will be downloaded. For an example of how to add a bundle to the deps file have a look here.

The most important file to ignore is the app/config/parameters.ini it contains your database settings and should not be shared with git.

Here is a small video of how to install Symfony2 with git version control. My first video tutorial in years and I mumble a bit but I hope someone likes it ;).
[youtube=http://www.youtube.com/watch?v=j-PJe2jDl8I&w=500&h=385]

Available configuration options: – on – is main option and can be create, update, change this tells when it should be updated – field – only valid if on=”change” is specified, tracks property for changes – value – only valid if on=”change” is specified, if tracked field has this value then it updates timestamp