Permalink
Browse files

copied back in web_app template

  • Loading branch information...
1 parent df70108 commit 7063976efaf4e2923f7682e8f5baafbdefd5d7d0 Tony Hillerson committed Feb 1, 2010
Showing with 35 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +0 −2 peeps/recipes/default.rb
  3. +34 −0 peeps/templates/default/web_app.conf.erb
View
1 .gitignore
@@ -1,2 +1,3 @@
tmp/*
.rake_test_cache
+/peeps/.DS_Store
View
2 peeps/recipes/default.rb
@@ -1,8 +1,6 @@
include_recipe "passenger_enterprise"
include_recipe "rails_enterprise"
-cookbook "passenger"
-
web_app "peeps" do
docroot "/home/tony/peeps/public"
server_name "peeps.#{node[:domain]}"
View
34 peeps/templates/default/web_app.conf.erb
@@ -0,0 +1,34 @@
+<VirtualHost *:80>
+ ServerName <%= @params[:server_name] %>
+ ServerAlias <% @params[:server_aliases].each do |a| %><%= "#{a}" %> <% end %>
+ DocumentRoot <%= @params[:docroot] %>
+
+ RailsBaseURI /
+ RailsEnv <%= @params[:rails_env] %>
+ RailsAllowModRewrite on
+ PassengerMaxPoolSize <%= @node[:rails][:max_pool_size] %>
+
+ <Directory <%= @params[:docroot] %>>
+ Options FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+ </Directory>
+
+ LogLevel info
+ ErrorLog <%= @node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
+ CustomLog <%= @node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined
+
+ RewriteEngine On
+ RewriteLog <%= @node[:apache][:log_dir] %>/<%= @application_name %>-rewrite.log
+ RewriteLogLevel 0
+ # Canonical host
+ RewriteCond %{HTTP_HOST} !^<%= @params[:server_name] %> [NC]
+ RewriteCond %{HTTP_HOST} !^$
+ RewriteRule ^/(.*)$ http://<%= @params[:server_name] %>/$1 [L,R=301]
+
+ RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
+ RewriteCond %{SCRIPT_FILENAME} !maintenance.html
+ RewriteRule ^.*$ /system/maintenance.html [L]
+
+</VirtualHost>

0 comments on commit 7063976

Please sign in to comment.