Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/chef
diff options
context:
space:
mode:
authorRaphael <raphael@joindiaspora.com>2010-12-02 20:57:25 +0300
committerRaphael <raphael@joindiaspora.com>2010-12-02 23:35:26 +0300
commite9ec8cea0504c958c7bb2dc499a7edb9b9c751a4 (patch)
treef8943efe3c9a0b91aecc001b6d331fc28f5c1f77 /chef
parentedf703aa78c99979e8629be5083ef17d0cc883fb (diff)
Update nginx conf
Diffstat (limited to 'chef')
-rw-r--r--chef/cookbooks/common/templates/default/nginx.conf.erb42
1 files changed, 26 insertions, 16 deletions
diff --git a/chef/cookbooks/common/templates/default/nginx.conf.erb b/chef/cookbooks/common/templates/default/nginx.conf.erb
index 3c2d18eab..b927e7c0e 100644
--- a/chef/cookbooks/common/templates/default/nginx.conf.erb
+++ b/chef/cookbooks/common/templates/default/nginx.conf.erb
@@ -35,6 +35,9 @@ http {
server <%="localhost:#{port}"%>;
<% end %>
}
+ upstream resque_web {
+ server "localhost:5678";
+ }
server {
listen 843;
@@ -50,6 +53,24 @@ http {
}
}
+ server {
+ listen 80;
+ server_name resque.<%= @url %>;
+ rewrite ^(.*) https://resque.<%= @url %>$1 permanent;
+ }
+ server {
+
+ listen 443;
+ server_name resque.<%= @url %>;
+
+ ssl on;
+ ssl_certificate /usr/local/nginx/conf/diaspora.crt;
+ ssl_certificate_key /usr/local/nginx/conf/diaspora.key;
+
+ location / {
+ proxy_pass http://resque_web;
+ }
+ }
server {
listen 80;
@@ -85,24 +106,13 @@ http {
if (!-f $request_filename) {
proxy_pass http://thin_cluster;
break;
+ }
}
- }
- server {
-
- listen 443;
- server_name <%= @url %> resque.<%= @url %>;
-
- ssl on;
- ssl_certificate <%= @cert_location %>;
- ssl_certificate_key <%= @key_location %>;
-
- proxy_pass localhost:5678
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
}