0
@@ -30,12 +30,12 @@ namespace :deploy do
0
logger.info "generating .conf file"
0
- ServerAlias www.#{domain}
0
+ ServerName <%= domain %>
0
+ ServerAlias www.<%= domain %>
0
- DocumentRoot
#{deploy_to}/current/public
0
+ DocumentRoot
<%= deploy_to %>/current/public
0
- <Directory
#{deploy_to}/current/public>
0
+ <Directory
<%= deploy_to %>/current/public>
0
@@ -44,8 +44,8 @@ namespace :deploy do
0
# Configure mongrel_cluster
0
- <Proxy balancer://#{application}_cluster>
0
- <% (app_server_port.to_i...(app_servers.to_i+app_server_port.to_i)).each do |port| %><%= %{BalancerMember http://#{mongrel_address}:#{port}} %>
0
+ <Proxy balancer://<%=application%>_cluster>
0
+ <% (app_server_port.to_i...(app_servers.to_i+app_server_port.to_i)).each do |port| %><%= %{BalancerMember http://#{app_server_address}:#{port}} %>
0
@@ -68,7 +68,7 @@ namespace :deploy do
0
# Redirect all non-static requests to cluster
0
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
0
- RewriteRule ^/(.*)$ balancer://
#{application}_cluster%{REQUEST_URI} [P,QSA,L]
0
+ RewriteRule ^/(.*)$ balancer://
<%=application%>_cluster%{REQUEST_URI} [P,QSA,L]
0
AddOutputFilterByType DEFLATE text/html text/plain text/xml
0
@@ -76,14 +76,15 @@ namespace :deploy do
0
BrowserMatch ^Mozilla/4\.0[678] no-gzip
0
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
0
- ErrorLog logs/#{domain}-error_log
0
- CustomLog logs/#{domain}-access_log combined
0
+ ErrorLog logs/<%=domain%>-error_log
0
+ CustomLog logs/<%=domain%>-access_log combined
0
- result = ERB.new(template_file).result(binding)
0
- put result, "#{application}.conf"
0
+ config = ERB.new(template_file)
0
+ put config.result(binding), "#{application}.conf"
0
logger.info "placing #{application}.conf on remote server"
0
sudo "mv #{application}.conf #{apache_conf}"
0
sudo "chown deploy:users #{apache_conf}"
Comments
No one has commented yet.