Browse files

Adding example for redirecting to example.com to www.example.com and …

…for multiple apps on a single server
  • Loading branch information...
1 parent fa83af3 commit 87c2ec08d2671ec614658a39684fd84cfe756a62 @cwsaylor cwsaylor committed Apr 3, 2012
Showing with 10 additions and 3 deletions.
  1. +9 −2 lib/cap_bootstrap/recipes/templates/nginx_unicorn.erb
  2. +1 −1 lib/cap_bootstrap/version.rb
View
11 lib/cap_bootstrap/recipes/templates/nginx_unicorn.erb
@@ -2,9 +2,16 @@ upstream unicorn_<%= application %> {
server unix:/tmp/unicorn.<%= application %>.sock fail_timeout=0;
}
+# Redirect example.com to www.example.com
+#server {
+# listen 80;
+# server_name example.com;
+# rewrite ^(.*) http://www.example.com$1 permanent;
+#}
+
server {
- listen 80 default deferred;
- # server_name example.com;
+ listen 80 default deferred; # Remove default and deferred for multiple apps on a single server
+ # server_name www.example.com;
root <%= current_path %>/public;
location ^~ /assets/ {
View
2 lib/cap_bootstrap/version.rb
@@ -1,3 +1,3 @@
module CapBootstrap
- VERSION = "0.2"
+ VERSION = "0.3"
end

0 comments on commit 87c2ec0

Please sign in to comment.