Skip to content

Commit

Permalink
Adding example for redirecting to example.com to www.example.com and …
Browse files Browse the repository at this point in the history
…for multiple apps on a single server
  • Loading branch information
cwsaylor committed Apr 3, 2012
1 parent fa83af3 commit 87c2ec0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions lib/cap_bootstrap/recipes/templates/nginx_unicorn.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ upstream unicorn_<%= application %> {
server unix:/tmp/unicorn.<%= application %>.sock fail_timeout=0; 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 { server {
listen 80 default deferred; listen 80 default deferred; # Remove default and deferred for multiple apps on a single server
# server_name example.com; # server_name www.example.com;
root <%= current_path %>/public; root <%= current_path %>/public;


location ^~ /assets/ { location ^~ /assets/ {
Expand Down
2 changes: 1 addition & 1 deletion lib/cap_bootstrap/version.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
module CapBootstrap module CapBootstrap
VERSION = "0.2" VERSION = "0.3"
end end

0 comments on commit 87c2ec0

Please sign in to comment.