ServerName <%= apache_server_name %> <% apache_server_aliases_array.each do |a| %> ServerAlias <%= "#{a}" %> <% end %> DocumentRoot <%= "#{current_path}/public" %> > Options FollowSymLinks AllowOverride None Order allow,deny Allow from all # set the environment RailsEnv <%= rails_env.to_s %> <% if use_mod_rewrite %> RailsAllowModRewrite on RewriteEngine On # Prevent access to .svn directories RewriteRule ^(.*/)?\.svn/ - [F,L] ErrorDocument 403 "Access Forbidden" # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] <% end %> # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html ErrorLog logs/<%= domain %>-error_log CustomLog logs/<%= domain %>-access_log combined