Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Unix domain socket support in Passenger Standalone.

  • Loading branch information...
commit 2f225ddbc2161a1766c9cb326e5a661ae3848bd6 1 parent 62ed3c9
@FooBarWidget FooBarWidget authored
View
12 lib/phusion_passenger/standalone/start_command.rb
@@ -484,16 +484,16 @@ def stop_threads
#### Config file template helpers ####
- def nginx_listen_address(for_ping_port = false)
- if @options[:socket_file]
- return "unix:" + File.expand_path(@options[:socket_file])
+ def nginx_listen_address(options = @options, for_ping_port = false)
+ if options[:socket_file]
+ return "unix:" + File.expand_path(options[:socket_file])
else
if for_ping_port
- port = @options[:ping_port]
+ port = options[:ping_port]
else
- port = @options[:port]
+ port = options[:port]
end
- return "#{@options[:address]}:#{port}"
+ return "#{options[:address]}:#{port}"
end
end
View
4 lib/phusion_passenger/templates/standalone/config.erb
@@ -41,14 +41,14 @@ http {
<% if @options[:ping_port] %>
server {
- listen <%= nginx_listen_address(true) %>;
+ listen <%= nginx_listen_address(@options, true) %>;
root '<%= LIBDIR %>/phusion_passenger/templates/standalone_default_root';
}
<% end %>
<% for app in @apps %>
server {
- listen <%= @options[:address] %>:<%= @options[:port] %>;
+ listen <%= nginx_listen_address(app) %>;
server_name <%= app[:server_names].join(' ') %>;
root '<%= app[:root] %>/public';
passenger_enabled on;
Please sign in to comment.
Something went wrong with that request. Please try again.