Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated domains in light of new SSL policies

  • Loading branch information...
commit 227479152be24ab74504af64d4ab616937976bd8 1 parent 2f85f5c
David Winterbottom authored October 08, 2012
6  www/deploy/apache2/prod.conf
... ...
@@ -1,6 +1,6 @@
1 1
 <VirtualHost *>
2 2
     ServerAdmin sys@{{ domain }}
3  
-    ServerName prod-{{ project_code }}-{{ client }}.{{ domain }}
  3
+    ServerName {{ client }}-{{ project_code }}-prod.{{ domain }}
4 4
     DocumentRoot /var/www/nginx-default
5 5
     
6 6
     WSGIDaemonProcess {{ client }}-{{ project_code }}-prod processes=9 threads=10 display-name={{ client }}-{{ project_code }}-prod maximum-requests=10000
@@ -18,7 +18,7 @@
18 18
     # - %T is time to serve the request in SECONDS
19 19
     # - %D is time to serve the request in MICROSECONDS
20 20
     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
21  
-    CustomLog /var/log/apache2/access.prod-{{ project_code }}-{{ client }}.{{ domain }}.log timed
22  
-    ErrorLog /var/log/apache2/error.prod-{{ project_code }}-{{ client }}.{{ domain }}.log 
  21
+    CustomLog /var/log/apache2/access.{{ client }}-{{ project_code }}-prod.{{ domain }}.log timed
  22
+    ErrorLog /var/log/apache2/error.{{ client }}-{{ project_code }}-prod.{{ domain }}.log 
23 23
     
24 24
 </Virtualhost>
6  www/deploy/apache2/stage.conf
... ...
@@ -1,6 +1,6 @@
1 1
 <VirtualHost *>
2 2
     ServerAdmin sys@{{ domain }}
3  
-    ServerName stage-{{ project_code }}-{{ client }}.{{ domain }}
  3
+    ServerName {{ client }}-{{ project_code }}-stage.{{ domain }}
4 4
     DocumentRoot /var/www/nginx-default
5 5
     
6 6
     WSGIDaemonProcess {{ client }}-{{ project_code }}-stage processes=2 threads=5 display-name={{ client }}-{{ project_code }}-stage maximum-requests=10000
@@ -18,8 +18,8 @@
18 18
     # - %T is time to serve the request in SECONDS
19 19
     # - %D is time to serve the request in MICROSECONDS
20 20
     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
21  
-    CustomLog /var/log/apache2/access.stage-{{ project_code }}-{{ client }}.{{ domain }}.log timed
22  
-    ErrorLog /var/log/apache2/error.stage-{{ project_code }}-{{ client }}.{{ domain }}.log 
  21
+    CustomLog /var/log/apache2/access.{{ client }}-{{ project_code }}-stage.{{ domain }}.log timed
  22
+    ErrorLog /var/log/apache2/error.{{ client }}-{{ project_code }}-stage.{{ domain }}.log 
23 23
     
24 24
     # This will need removing when we go live.
25 25
     <Location />
6  www/deploy/apache2/test.conf
... ...
@@ -1,6 +1,6 @@
1 1
 <VirtualHost *>
2 2
     ServerAdmin sys@{{ domain }}
3  
-    ServerName test-{{ project_code }}-{{ client }}.{{ domain }}
  3
+    ServerName {{ client }}-{{ project_code }}-test.{{ domain }}
4 4
     DocumentRoot /var/www/nginx-default
5 5
     
6 6
     WSGIDaemonProcess {{ client }}-{{ project_code }}-test processes=2 threads=5 display-name={{ client }}-{{ project_code }}-test maximum-requests=10000
@@ -18,8 +18,8 @@
18 18
     # - %T is time to serve the request in SECONDS
19 19
     # - %D is time to serve the request in MICROSECONDS
20 20
     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
21  
-    CustomLog /var/log/apache2/access.test-{{ project_code }}-{{ client }}.{{ domain }}.log timed
22  
-    ErrorLog /var/log/apache2/error.test-{{ project_code }}-{{ client }}.{{ domain }}.log 
  21
+    CustomLog /var/log/apache2/access.{{ client }}-{{ project_code }}-test.{{ domain }}.log timed
  22
+    ErrorLog /var/log/apache2/error.{{ client }}-{{ project_code }}-test.{{ domain }}.log 
23 23
     
24 24
     # This will need removing when we go live.
25 25
     <Location />
23  www/deploy/nginx/prod.conf
... ...
@@ -1,16 +1,18 @@
1 1
 server {
2 2
     listen 80;
3  
-    server_name prod-{{ project_code }}-{{ client }}.{{ domain }};
4  
-    access_log /var/log/nginx/access.prod-{{ project_code }}-{{ client }}.{{ domain }};
  3
+    server_name {{ client }}-{{ project_code }}-prod.{{ domain }};
  4
+    access_log /var/log/nginx/access.{{ client }}-{{ project_code }}-prod.{{ domain }};
5 5
     
6 6
     gzip on;
  7
+	gzip_static on;
7 8
     gzip_proxied any;
8  
-    gzip_types text/plain application/xml application/x-javascript text/javascript text/css;
  9
+    gzip_types text/plain application/xml application/x-javascript text/javascript text/css application/x-json;
9 10
 
10 11
     proxy_pass_request_headers on;
11 12
     proxy_set_header Host $host;
12 13
     proxy_set_header X-Real-IP $remote_addr;
13 14
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  15
+    proxy_set_header X-Url-Scheme $scheme;
14 16
     proxy_read_timeout 120s;
15 17
     
16 18
     client_max_body_size 20m;    
@@ -19,12 +21,15 @@ server {
19 21
         proxy_pass http://localhost:81/;
20 22
     }
21 23
     
22  
-    location ~* \.(jpg|png|gif|jpeg|js|css|htm|mp3|wav|swf|mov|doc|xls|ppt|docx|pptx|xlsx|swf|woff|otf|eot|ttf|ico|xml)$ {
  24
+    location /static/ {
23 25
         expires max;
24  
-        root /var/www/{{ client }}/{{ project_code }}/builds/prod/public/;
25  
-        if (!-f $request_filename) {
26  
-            break;
27  
-            proxy_pass http://localhost:81;
28  
-        }
  26
+        alias /var/www/{{ client }}/{{ project_code }}/builds/prod/public/static/;
  27
+		break;
  28
+    }
  29
+
  30
+    location /media/ {
  31
+        expires max;
  32
+        alias /var/www/{{ client }}/{{ project_code }}/builds/prod/public/media/;
  33
+		break;
29 34
     }
30 35
 }
23  www/deploy/nginx/stage.conf
... ...
@@ -1,16 +1,18 @@
1 1
 server {
2 2
     listen 80;
3  
-    server_name stage-{{ project_code }}-{{ client }}.{{ domain }};
4  
-    access_log /var/log/nginx/access.stage-{{ project_code }}-{{ client }}.{{ domain }};
  3
+    server_name {{ client }}-{{ project_code }}-stage.{{ domain }};
  4
+    access_log /var/log/nginx/access.{{ client }}-{{ project_code }}-stage.{{ domain }};
5 5
     
6 6
     gzip on;
  7
+	gzip_static on;
7 8
     gzip_proxied any;
8  
-    gzip_types text/plain application/xml application/x-javascript text/javascript text/css;
  9
+    gzip_types text/plain application/xml application/x-javascript text/javascript text/css application/x-json;
9 10
 
10 11
     proxy_pass_request_headers on;
11 12
     proxy_set_header Host $host;
12 13
     proxy_set_header X-Real-IP $remote_addr;
13 14
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  15
+    proxy_set_header X-Url-Scheme $scheme;
14 16
     proxy_read_timeout 120s;
15 17
     
16 18
     client_max_body_size 20m;    
@@ -19,12 +21,15 @@ server {
19 21
         proxy_pass http://localhost:81/;
20 22
     }
21 23
     
22  
-    location ~* \.(jpg|png|gif|jpeg|js|css|htm|mp3|wav|swf|mov|doc|xls|ppt|docx|pptx|xlsx|swf|woff|otf|eot|ttf|ico|xml)$ {
  24
+    location /static/ {
23 25
         expires max;
24  
-        root /var/www/{{ client }}/{{ project_code }}/builds/stage/public/;
25  
-        if (!-f $request_filename) {
26  
-            break;
27  
-            proxy_pass http://localhost:81;
28  
-        }
  26
+        alias /var/www/{{ client }}/{{ project_code }}/builds/stage/public/static/;
  27
+		break;
  28
+    }
  29
+
  30
+    location /media/ {
  31
+        expires max;
  32
+        alias /var/www/{{ client }}/{{ project_code }}/builds/stage/public/media/;
  33
+		break;
29 34
     }
30 35
 }
23  www/deploy/nginx/test.conf
... ...
@@ -1,16 +1,18 @@
1 1
 server {
2 2
     listen 80;
3  
-    server_name test-{{ project_code }}-{{ client }}.{{ domain }};
4  
-    access_log /var/log/nginx/access.test-{{ project_code }}-{{ client }}-{{ domain }};
  3
+    server_name {{ client }}-{{ project_code }}-test.{{ domain }};
  4
+    access_log /var/log/nginx/access.{{ client }}-{{ project_code }}-test.{{ domain }};
5 5
     
6 6
     gzip on;
  7
+	gzip_static on;
7 8
     gzip_proxied any;
8  
-    gzip_types text/plain application/xml application/x-javascript text/javascript text/css;
  9
+    gzip_types text/plain application/xml application/x-javascript text/javascript text/css application/x-json;
9 10
 
10 11
     proxy_pass_request_headers on;
11 12
     proxy_set_header Host $host;
12 13
     proxy_set_header X-Real-IP $remote_addr;
13 14
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  15
+    proxy_set_header X-Url-Scheme $scheme;
14 16
     proxy_read_timeout 120s;
15 17
     
16 18
     client_max_body_size 20m;    
@@ -19,12 +21,15 @@ server {
19 21
         proxy_pass http://localhost:81/;
20 22
     }
21 23
     
22  
-    location ~* \.(jpg|png|gif|jpeg|js|css|htm|mp3|wav|swf|mov|doc|xls|ppt|docx|pptx|xlsx|swf|woff|otf|eot|ttf|ico|xml)$ {
  24
+    location /static/ {
23 25
         expires max;
24  
-        root /var/www/{{ client }}/{{ project_code }}/builds/test/public/;
25  
-        if (!-f $request_filename) {
26  
-            break;
27  
-            proxy_pass http://localhost:81;
28  
-        }
  26
+        alias /var/www/{{ client }}/{{ project_code }}/builds/test/public/static/;
  27
+		break;
  28
+    }
  29
+
  30
+    location /media/ {
  31
+        expires max;
  32
+        alias /var/www/{{ client }}/{{ project_code }}/builds/test/public/media/;
  33
+		break;
29 34
     }
30 35
 }

0 notes on commit 2274791

Please sign in to comment.
Something went wrong with that request. Please try again.