rails_pwnerer 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/lib/rails_pwnerer/app/config.rb +4 -1
- data/lib/rails_pwnerer/app/nginx_config.rb +1 -0
- data/rails_pwnerer.gemspec +1 -1
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -35,8 +35,10 @@ class RailsPwnerer::App::Config
|
|
35
35
|
app_db[:dns_name] ||= ''
|
36
36
|
# the environment to run the application in
|
37
37
|
app_db[:environment] ||= 'production'
|
38
|
-
#
|
38
|
+
# main port where the application receives HTTP(S) outside connections
|
39
39
|
app_db[:port] ||= 80
|
40
|
+
# HTTPS applications also accept HTTP connections here, unless 0
|
41
|
+
app_db[:non_ssl_port] ||= 80
|
40
42
|
# the maximum request size (megabytes) to be accepted by an application
|
41
43
|
app_db[:max_request_mb] ||= 48
|
42
44
|
# comma-separated directories that should be writable by the application user
|
@@ -87,6 +89,7 @@ class RailsPwnerer::App::Config
|
|
87
89
|
app_config[:ssl_cert] = ssl_cert
|
88
90
|
app_config[:ssl_key] = ssl_key
|
89
91
|
app_config[:port] = 443
|
92
|
+
app_config[:non_ssl_port] = 80
|
90
93
|
end
|
91
94
|
|
92
95
|
["config/rails_pwnerer.yml", "config/rails_pwnerer/#{instance_name}.yml"].each do |fname|
|
@@ -32,6 +32,7 @@ class RailsPwnerer::App::NginxConfig
|
|
32
32
|
f << <<NGINX_CONFIG
|
33
33
|
server {
|
34
34
|
listen #{app_port}#{app_config[:ssl_key] ? ' ssl' : ''};
|
35
|
+
#{(app_config[:ssl_key] && app_config[:non_ssl_port] != 0) ? "listen #{app_config[:non_ssl_port]}" : "" }
|
35
36
|
charset utf-8;
|
36
37
|
#{app_config[:ssl_key] ? 'ssl on;' : ''}
|
37
38
|
#{app_config[:ssl_key] ? "ssl_certificate #{app_config[:ssl_cert]};" : ''}
|
data/rails_pwnerer.gemspec
CHANGED