Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated domains in light of new SSL policies

  • Loading branch information...
commit 227479152be24ab74504af64d4ab616937976bd8 1 parent 2f85f5c
David Winterbottom codeinthehole authored
6 www/deploy/apache2/prod.conf
View
@@ -1,6 +1,6 @@
<VirtualHost *>
ServerAdmin sys@{{ domain }}
- ServerName prod-{{ project_code }}-{{ client }}.{{ domain }}
+ ServerName {{ client }}-{{ project_code }}-prod.{{ domain }}
DocumentRoot /var/www/nginx-default
WSGIDaemonProcess {{ client }}-{{ project_code }}-prod processes=9 threads=10 display-name={{ client }}-{{ project_code }}-prod maximum-requests=10000
@@ -18,7 +18,7 @@
# - %T is time to serve the request in SECONDS
# - %D is time to serve the request in MICROSECONDS
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
- CustomLog /var/log/apache2/access.prod-{{ project_code }}-{{ client }}.{{ domain }}.log timed
- ErrorLog /var/log/apache2/error.prod-{{ project_code }}-{{ client }}.{{ domain }}.log
+ CustomLog /var/log/apache2/access.{{ client }}-{{ project_code }}-prod.{{ domain }}.log timed
+ ErrorLog /var/log/apache2/error.{{ client }}-{{ project_code }}-prod.{{ domain }}.log
</Virtualhost>
6 www/deploy/apache2/stage.conf
View
@@ -1,6 +1,6 @@
<VirtualHost *>
ServerAdmin sys@{{ domain }}
- ServerName stage-{{ project_code }}-{{ client }}.{{ domain }}
+ ServerName {{ client }}-{{ project_code }}-stage.{{ domain }}
DocumentRoot /var/www/nginx-default
WSGIDaemonProcess {{ client }}-{{ project_code }}-stage processes=2 threads=5 display-name={{ client }}-{{ project_code }}-stage maximum-requests=10000
@@ -18,8 +18,8 @@
# - %T is time to serve the request in SECONDS
# - %D is time to serve the request in MICROSECONDS
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
- CustomLog /var/log/apache2/access.stage-{{ project_code }}-{{ client }}.{{ domain }}.log timed
- ErrorLog /var/log/apache2/error.stage-{{ project_code }}-{{ client }}.{{ domain }}.log
+ CustomLog /var/log/apache2/access.{{ client }}-{{ project_code }}-stage.{{ domain }}.log timed
+ ErrorLog /var/log/apache2/error.{{ client }}-{{ project_code }}-stage.{{ domain }}.log
# This will need removing when we go live.
<Location />
6 www/deploy/apache2/test.conf
View
@@ -1,6 +1,6 @@
<VirtualHost *>
ServerAdmin sys@{{ domain }}
- ServerName test-{{ project_code }}-{{ client }}.{{ domain }}
+ ServerName {{ client }}-{{ project_code }}-test.{{ domain }}
DocumentRoot /var/www/nginx-default
WSGIDaemonProcess {{ client }}-{{ project_code }}-test processes=2 threads=5 display-name={{ client }}-{{ project_code }}-test maximum-requests=10000
@@ -18,8 +18,8 @@
# - %T is time to serve the request in SECONDS
# - %D is time to serve the request in MICROSECONDS
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
- CustomLog /var/log/apache2/access.test-{{ project_code }}-{{ client }}.{{ domain }}.log timed
- ErrorLog /var/log/apache2/error.test-{{ project_code }}-{{ client }}.{{ domain }}.log
+ CustomLog /var/log/apache2/access.{{ client }}-{{ project_code }}-test.{{ domain }}.log timed
+ ErrorLog /var/log/apache2/error.{{ client }}-{{ project_code }}-test.{{ domain }}.log
# This will need removing when we go live.
<Location />
23 www/deploy/nginx/prod.conf
View
@@ -1,16 +1,18 @@
server {
listen 80;
- server_name prod-{{ project_code }}-{{ client }}.{{ domain }};
- access_log /var/log/nginx/access.prod-{{ project_code }}-{{ client }}.{{ domain }};
+ server_name {{ client }}-{{ project_code }}-prod.{{ domain }};
+ access_log /var/log/nginx/access.{{ client }}-{{ project_code }}-prod.{{ domain }};
gzip on;
+ gzip_static on;
gzip_proxied any;
- gzip_types text/plain application/xml application/x-javascript text/javascript text/css;
+ gzip_types text/plain application/xml application/x-javascript text/javascript text/css application/x-json;
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Url-Scheme $scheme;
proxy_read_timeout 120s;
client_max_body_size 20m;
@@ -19,12 +21,15 @@ server {
proxy_pass http://localhost:81/;
}
- 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)$ {
+ location /static/ {
expires max;
- root /var/www/{{ client }}/{{ project_code }}/builds/prod/public/;
- if (!-f $request_filename) {
- break;
- proxy_pass http://localhost:81;
- }
+ alias /var/www/{{ client }}/{{ project_code }}/builds/prod/public/static/;
+ break;
+ }
+
+ location /media/ {
+ expires max;
+ alias /var/www/{{ client }}/{{ project_code }}/builds/prod/public/media/;
+ break;
}
}
23 www/deploy/nginx/stage.conf
View
@@ -1,16 +1,18 @@
server {
listen 80;
- server_name stage-{{ project_code }}-{{ client }}.{{ domain }};
- access_log /var/log/nginx/access.stage-{{ project_code }}-{{ client }}.{{ domain }};
+ server_name {{ client }}-{{ project_code }}-stage.{{ domain }};
+ access_log /var/log/nginx/access.{{ client }}-{{ project_code }}-stage.{{ domain }};
gzip on;
+ gzip_static on;
gzip_proxied any;
- gzip_types text/plain application/xml application/x-javascript text/javascript text/css;
+ gzip_types text/plain application/xml application/x-javascript text/javascript text/css application/x-json;
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Url-Scheme $scheme;
proxy_read_timeout 120s;
client_max_body_size 20m;
@@ -19,12 +21,15 @@ server {
proxy_pass http://localhost:81/;
}
- 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)$ {
+ location /static/ {
expires max;
- root /var/www/{{ client }}/{{ project_code }}/builds/stage/public/;
- if (!-f $request_filename) {
- break;
- proxy_pass http://localhost:81;
- }
+ alias /var/www/{{ client }}/{{ project_code }}/builds/stage/public/static/;
+ break;
+ }
+
+ location /media/ {
+ expires max;
+ alias /var/www/{{ client }}/{{ project_code }}/builds/stage/public/media/;
+ break;
}
}
23 www/deploy/nginx/test.conf
View
@@ -1,16 +1,18 @@
server {
listen 80;
- server_name test-{{ project_code }}-{{ client }}.{{ domain }};
- access_log /var/log/nginx/access.test-{{ project_code }}-{{ client }}-{{ domain }};
+ server_name {{ client }}-{{ project_code }}-test.{{ domain }};
+ access_log /var/log/nginx/access.{{ client }}-{{ project_code }}-test.{{ domain }};
gzip on;
+ gzip_static on;
gzip_proxied any;
- gzip_types text/plain application/xml application/x-javascript text/javascript text/css;
+ gzip_types text/plain application/xml application/x-javascript text/javascript text/css application/x-json;
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Url-Scheme $scheme;
proxy_read_timeout 120s;
client_max_body_size 20m;
@@ -19,12 +21,15 @@ server {
proxy_pass http://localhost:81/;
}
- 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)$ {
+ location /static/ {
expires max;
- root /var/www/{{ client }}/{{ project_code }}/builds/test/public/;
- if (!-f $request_filename) {
- break;
- proxy_pass http://localhost:81;
- }
+ alias /var/www/{{ client }}/{{ project_code }}/builds/test/public/static/;
+ break;
+ }
+
+ location /media/ {
+ expires max;
+ alias /var/www/{{ client }}/{{ project_code }}/builds/test/public/media/;
+ break;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.