pulled out the certlocations to a config file

This commit is contained in:
zhitomirskiyi 2010-11-19 18:14:14 -08:00
parent 69bc1e645f
commit e8d86d6d07
4 changed files with 8 additions and 3 deletions

View file

@ -142,6 +142,8 @@ GEM
childprocess (0.1.4)
ffi (~> 0.6.3)
closure-compiler (0.3.3)
cloudfiles (1.4.9)
mime-types (>= 1.16)
columnize (0.3.2)
configuration (1.1.0)
crack (0.1.8)
@ -363,6 +365,7 @@ DEPENDENCIES
capybara (~> 0.3.9)
carrierwave!
chef
cloudfiles
cucumber-rails (= 0.3.2)
database_cleaner (= 0.5.2)
devise (= 1.1.3)

View file

@ -3,3 +3,5 @@ thins:
- port: '3002'
- port: '3003'
url: 'alpha.joindiaspora.com'
cert_location: '/usr/local/nginx/conf/diaspora.crt'
key_location: '/usr/local/nginx/conf/diaspora.key'

View file

@ -29,5 +29,5 @@ end
config = YAML.load_file("/usr/local/app/diaspora/chef/cookbooks/common/files/default/thins.yml")
template "/usr/local/nginx/conf/nginx.conf" do
source "nginx.conf.erb"
variables :ports => config['thins'].map{|thin| "#{thin["port"]}"}, :url => config['url']
variables :ports => config['thins'].map{|thin| "#{thin["port"]}"}, :url => config['url'], :cert_location => config['cert_location'], :key_location => config['key_location']
end

View file

@ -65,8 +65,8 @@ http {
root /usr/local/app/diaspora/public;
ssl on;
ssl_certificate /usr/local/nginx/conf/diaspora.crt;
ssl_certificate_key /usr/local/nginx/conf/diaspora.key;
ssl_certificate <%= @cert_location %>;
ssl_certificate_key <%= @key_location %>;
location / {
proxy_set_header X-Real-IP $remote_addr;