I deploy my Rails applications with Capistrano to an Ubuntu machine, which uses the excellent Debian style layout of Apache 2 configuration files.
To keep things tidy, I like to place the Apache configuration file inside the config directory of the Rails project, along with the rest of the configuration for the Rails application and Mongrel.
With the help of a couple of Capistrano rules I can then ensure that, on deployment, the latest Apache configuration file is also sent to the server:
# after setup, do a one-time link in task :after_setup do sudo "ln -nfs #{current_path}/config/#{application} /etc/apache2/sites-available/" end # cause apache2 to re-read. you probably have this rule anyway task :restart do # if you're running mongrel_cluster, uncomment the following line # restart_mongrel_cluster sudo "/usr/sbin/apache2ctl graceful" end
The first time round you'll probably want to do a2ensite yourapp manually, but this could easily be added into the after_setup rule.
Not rocket science, but a pleasing bit of configuration that keeps things tidy.