<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>views/nginx/app.erb</filename>
    </added>
    <added>
      <filename>views/nginx/simple.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -21,10 +21,10 @@ lib/archangel/nginx_builder.rb
 lib/archangel/site.rb
 lib/archangel/site_builder.rb
 lib/archangel/version.rb
-log/debug.log
 script/destroy
 script/generate
 setup.rb
+spec/archangel/configuration_builder_spec.rb
 spec/archangel/configuration_spec.rb
 spec/archangel/mongrel_spec.rb
 spec/archangel/site_builder_spec.rb
@@ -36,6 +36,7 @@ tasks/environment.rake
 tasks/rspec.rake
 tasks/website.rake
 views/archangel.god
+views/nginx/app.erb
 views/nginx/main.erb
-views/nginx/server.erb
+views/nginx/simple.erb
 views/nginx/upstream.erb</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ module Archangel
     def initialize(configuration)
       @configuration = configuration
     end
-    attr_writer :base_path, :default_root, :mime_types, :pid_file, :error_log, :access_log
+    attr_writer :base_path, :port, :default_root, :mime_types, :pid_file, :error_log, :access_log
     attr_accessor :uid, :gid
     
     def file(key)
@@ -24,6 +24,10 @@ module Archangel
         raise IndexError, &quot;#{key.inspect} not found&quot;
       end
     end
+
+    def port
+      @port || 80
+    end
     
     def base_path
       @base_path || &quot;&quot;
@@ -57,9 +61,7 @@ module Archangel
       views = {}
       views[&quot;nginx.conf&quot;] = @configuration.render_with('nginx/main', render_attributes)
       @configuration.sites_running_on(:nginx).each do |site|
-        attributes = render_attributes.merge(:site =&gt; site)
-        views[&quot;servers/#{site.name}.conf&quot;]   = @configuration.render_with('nginx/server', attributes)
-        views[&quot;upstreams/#{site.name}.conf&quot;] = @configuration.render_with('nginx/upstream', attributes)
+        views.merge!(site.render(render_attributes))
       end
       views
     end
@@ -127,4 +129,4 @@ module Archangel
       end
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/archangel/nginx.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,6 +11,10 @@ module Archangel
     def gid(gid)
       @nginx.gid = gid
     end
+
+    def port(number)
+      @nginx.port = number
+    end
     
     def base_path(base_path)
       @nginx.base_path = base_path
@@ -36,4 +40,4 @@ module Archangel
       @nginx.access_log = access_log
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/archangel/nginx_builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module Archangel
     end
     attr_reader :name, :options, :configuration
     attr_accessor :hostnames, :aliases, :profile_name, :fair
-    attr_writer :port, :path
+    attr_writer :port, :template, :path
     
     def watch
       upstreams.each do |upstream|
@@ -27,6 +27,10 @@ module Archangel
     def profile
       @profile ||= configuration.profile_for(profile_name)
     end
+
+    def template
+      @template || &quot;app&quot;
+    end
     
     def path
       @path || name
@@ -81,5 +85,13 @@ module Archangel
     def fair?
       fair
     end
+
+    def render(render_attributes)
+      views = {}
+      attributes = render_attributes.merge(:site =&gt; self)
+      views[&quot;servers/#{name}.conf&quot;]   = @configuration.render_with(&quot;nginx/#{template}&quot;, attributes)
+      views[&quot;upstreams/#{name}.conf&quot;] = @configuration.render_with(&quot;nginx/upstream&quot;, attributes)
+      views
+    end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/archangel/site.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,10 @@ module Archangel
     def profile(name)
       @site.profile_name = name
     end
+
+    def template(name)
+      @site.template = name
+    end
     
     def fair
       @site.fair = true
@@ -41,4 +45,4 @@ module Archangel
       end
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/archangel/site_builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@ http {
                       application/xml application/xml+rss text/javascript;
 
   server {
-    listen 80;
+    listen &lt;%= nginx.port %&gt;;
 
     client_max_body_size 50M;
 
@@ -45,4 +45,5 @@ http {
 
   include &lt;%= nginx.base_path %&gt;/upstreams/*.conf;
   include &lt;%= nginx.base_path %&gt;/servers/*.conf;
+  include &lt;%= nginx.base_path %&gt;/custom/*.conf;
 }</diff>
      <filename>views/nginx/main.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+&lt;% if site.upstreams.any? %&gt;
 upstream &lt;%= site.name %&gt; {
   &lt;% if site.fair? %&gt;
     fair;
@@ -5,4 +6,5 @@ upstream &lt;%= site.name %&gt; {
   &lt;% site.upstreams.each do |upstream| %&gt;
     server &lt;%= upstream.host_port %&gt;;
   &lt;% end %&gt;
-}
\ No newline at end of file
+}
+&lt;% end %&gt;</diff>
      <filename>views/nginx/upstream.erb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>views/nginx/server.erb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>af5ab590234569ad60e60fb8246e781d762d5710</id>
    </parent>
  </parents>
  <author>
    <name>Tim Carey-Smith</name>
    <email>tim@spork.in</email>
  </author>
  <url>http://github.com/halorgium/archangel/commit/f842d1238152f71bc7c55af6cc6223350d4dec3b</url>
  <id>f842d1238152f71bc7c55af6cc6223350d4dec3b</id>
  <committed-date>2008-02-19T19:48:10-08:00</committed-date>
  <authored-date>2008-02-19T19:48:10-08:00</authored-date>
  <message>Update the nginx to support non-rails vhosts</message>
  <tree>5a5330667b9067e88699511bb7d139fedaa36e9a</tree>
  <committer>
    <name>Tim Carey-Smith</name>
    <email>tim@spork.in</email>
  </committer>
</commit>
