<VirtualHost yourip>
AddDefaultCharset utf-8
ServerName www.yourhost.com
DocumentRoot /path/to/railsapp/public
ErrorDocument 500 /500.html
ErrorDocument 404 /404.html
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
ProxyPass /images !
ProxyPass /stylesheets !
ProxyPass /javascripts !
#continue with other static files that should be served by apache
Alias /images /path/to/railsapp/public/images
Alias /stylesheets /path/to/railsapp/public/stylesheets
Alias /javascripts /path/to/railsapp/public/javascripts
#continue with aliases for static content
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Directory /path/to/railsapp/public/>
Options Indexes FollowSymLinks
Order allow,deny
allow from all
</Directory>
</VirtualHost>