Permalink
Browse files

Comment the tc vhost sections.

  • Loading branch information...
1 parent 33aab2d commit e6a2e9ef70beab0b503fa98161bfe27d00b83d9c @benhoskings benhoskings committed Mar 28, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 nginx/tc_vhost.conf.erb
View
@@ -4,26 +4,30 @@ upstream <%= upstream_name %> {
server unix:<%= unicorn_socket %> fail_timeout=0;
}
+# AU www. redirect
server {
listen <%= listen_host %>:<%= listen_port %>;
server_name www.<%= domain %>;
return 301 http://<%= domain %>$request_uri;
}
<% if env == 'production' %>
+# Canonical www. redirect
server {
listen <%= listen_host_dot_com %>:<%= listen_port %>;
server_name www.<%= domain_dot_com %>;
return 301 http://<%= domain_dot_com %>$request_uri;
}
+# UK www. redirect
server {
listen <%= listen_host_uk %>:<%= listen_port %>;
server_name www.<%= domain_uk %>;
return 301 http://<%= domain_uk %>$request_uri;
}
<% end %>
+# AU -> canonical redirect
server {
listen <%= listen_host %>:<%= listen_port %>;
listen <%= listen_host %>:443 ssl;
@@ -35,7 +39,6 @@ server {
ssl_ciphers HIGH:!aNULL:!MD5:!kEDH;
<% if env == 'production' %>
- # All traffic is redirected to .com
location = / {
return 301 $scheme://<%= domain_dot_com %>/au;
}
@@ -46,6 +49,7 @@ server {
}
<% if env == 'production' %>
+# Canonical http:// vhost
server {
listen <%= listen_host_dot_com %>:<%= listen_port %>;
server_name <%= domain_dot_com %>;
@@ -59,6 +63,7 @@ server {
include vhosts/<%= domain %>.common;
}
+# Canonical https:// vhost
server {
listen <%= listen_host_dot_com %>:443 ssl;
server_name <%= domain_dot_com %>;
@@ -71,6 +76,7 @@ server {
include vhosts/<%= domain %>.common;
}
+# UK -> canonical redirect
server {
listen <%= listen_host_uk %>:<%= listen_port %>;
server_name <%= domain_uk %>;

0 comments on commit e6a2e9e

Please sign in to comment.