~ubuntu-branches/ubuntu/wily/ruby-passenger/wily-proposed

« back to all changes in this revision

Viewing changes to resources/templates/standalone/config.erb

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-11-23 23:50:02 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20131123235002-8fdhsq7afj15o2z2
Tags: 4.0.25-1
* New upstream release.
* Refresh fix_install_path.patch.
* Build for Ruby 2.0 instead of 1.8. (Closes: #725591)
* Add fix_ftbfs_fortify_source.patch.
* Install passenger template files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
daemon on;
11
11
error_log '<%= @options[:log_file] %>' <% if debugging? %>info<% end %>;
12
12
pid '<%= @options[:pid_file] %>';
 
13
 
13
14
<% if Process.euid == 0 %>
14
15
    <% if @options[:user] %>
 
16
        <%# Run workers as the given user. The master process will always run as root and will be able to bind to any port. %>
15
17
        user <%= @options[:user] %> <%= default_group_for(@options[:user]) %>;
16
18
    <% else %>
 
19
        <%# Prevent running Nginx workers as nobody. %>
17
20
        user <%= current_user %> <%= default_group_for(current_user) %>;
18
21
    <% end %>
19
22
<% end %>
28
31
    passenger_ruby <%= PlatformInfo.ruby_command %>;
29
32
    passenger_root '<%= location_config_filename %>';
30
33
    passenger_abort_on_startup_error on;
 
34
    passenger_ctl cleanup_pidfiles <%= serialize_strset("#{@temp_dir}/temp_dir_toucher.pid") %>;
31
35
    passenger_user_switching off;
32
36
    passenger_max_pool_size <%= @options[:max_pool_size] %>;
33
37
    passenger_min_instances <%= @options[:min_instances] %>;
34
38
    <% if @options[:user] %>
35
39
        passenger_user <%= @options[:user] %>;
36
40
        passenger_default_user <%= @options[:user] %>;
 
41
        passenger_analytics_log_user <%= @options[:user] %>;
37
42
    <% else %>
38
43
        passenger_user <%= current_user %>;
39
44
        passenger_default_user <%= current_user %>;
 
45
        passenger_analytics_log_user <%= current_user %>;
40
46
    <% end %>
41
47
    <% if debugging? %>passenger_log_level 2;<% end %>
 
48
    <% if @options[:temp_dir] %>passenger_temp_dir '<%= @options[:temp_dir] %>';<% end %>
42
49
    <% if @options[:rolling_restarts] %>passenger_rolling_restarts on;<% end %>
43
50
    <% if @options[:resist_deployment_errors] %>passenger_resist_deployment_errors on;<% end %>
44
51
 
52
59
    
53
60
    default_type application/octet-stream;
54
61
    types_hash_max_size 2048;
 
62
    server_names_hash_bucket_size 64;
55
63
    client_max_body_size 1024m;
56
64
    access_log off;
57
65
    keepalive_timeout 60;
79
87
    
80
88
    <% for app in @apps %>
81
89
    server {
82
 
        listen <%= nginx_listen_address(app) %>;
 
90
        listen <%= nginx_listen_address(app) %> <%= "ssl" if app[:ssl] %>;
83
91
        server_name <%= app[:server_names].join(' ') %>;
84
 
        root '<%= app[:root] %>/public';
 
92
        <% if app[:static_files_dir] %>
 
93
            root '<%= app[:static_files_dir] %>';
 
94
        <% else %>
 
95
            root '<%= app[:root] %>/public';
 
96
        <% end %>
85
97
        passenger_app_root '<%= app[:root] %>';
86
98
        passenger_enabled on;
87
 
        rails_env <%= app[:env] %>;
 
99
        passenger_app_env <%= app[:environment] %>;
88
100
        passenger_spawn_method <%= app[:spawn_method] %>;
 
101
        <% if app[:app_type] %>passenger_app_type <%= app[:app_type] %>;<% end %>
 
102
        <% if app[:startup_file] %>passenger_startup_file <%= app[:startup_file] %>;<% end %>
 
103
        <% if app[:concurrency_model] != DEFAULT_CONCURRENCY_MODEL %>passenger_concurrency_model <%= app[:concurrency_model] %>;<% end %>
 
104
        <% if app[:thread_count] != DEFAULT_THREAD_COUNT %>passenger_thread_count <%= app[:thread_count] %>;<% end %>
89
105
        <% if app[:min_instances] %>passenger_min_instances <%= app[:min_instances] %>;<% end %>
 
106
        <% if app[:restart_dir] %>passenger_restart_dir '<%= app[:restart_dir] %>';<% end %>
90
107
        <% if app[:union_station_key] %>
91
108
            union_station_support on;
92
109
            union_station_key <%= app[:union_station_key] %>;
93
110
        <% end %>
 
111
        <% if app[:ssl] %>
 
112
            ssl on;
 
113
            ssl_certificate <%= app[:ssl_certificate] %>;
 
114
            ssl_certificate_key <%= app[:ssl_certificate_key] %>;
 
115
        <% end %>
94
116
 
95
117
        # Rails asset pipeline support.
96
118
        location ~ ^/assets/ {