Sha256: e9dd3d4fa09f0124083257c6bb3659a52fdb85512308bb4ea2e9e8d135f2abce

Contents?: true

Size: 1.55 KB

Versions: 8

Compression:

Stored size: 1.55 KB

Contents

<%
  @path = "/etc/nginx/nginx.conf"
  
  also_web = rubber_instances[rubber_env.host].role_names.include?('web') rescue false
  # Only want to be additive if we are running web server on same host as tools
  if also_web
    @additive = ["# rubber-web_tools-start", "# rubber-web_tools-end"]
  end
%>

<%# only need this section if running without nginx configured for site %>
<% if ! also_web %>

  user www-data;
  worker_processes  1;
  
  error_log  /var/log/nginx/error.log;
  pid        /var/run/nginx.pid;
  
  events
  {
    worker_connections  1024;
  }
  
<% end %>

http
{
  include       /etc/nginx/mime.types;
  default_type  application/octet-stream;
  
  access_log  /var/log/nginx/access.log;
  
  sendfile        on;
  
  keepalive_timeout  65;
  tcp_nodelay        on;
  
  gzip  on;

  # This server is setup to serve www.
  server
  {
    listen <%= rubber_env.web_tools_port %>;
    client_max_body_size 10M;
  
    server_name <%= rubber_env.full_host %>;
  
    root /var/www;
  
  
    location /
    {
      # If the file exists as a static file serve it directly without
      # running all the other rewrite tests on it
      if (-f $request_filename)
      {
        break;
      }
  
      # check for index.html for directory index
      # if its there on the filesystem then rewite
      # the url to add /index.html to the end of it
      # and then break to send it to the next config rules.
      if (-f $request_filename/index.html)
      {
        rewrite (.*) $1/index.html break;
      }
    }
    
    include /etc/nginx/rubber/*.conf;
  }
  
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sml-rubber-0.9.1 generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
sml-rubber-0.9.3 generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
sml-rubber-0.9.4 generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
sml-rubber-0.9.5 generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
sml-rubber-0.9.6 generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
sml-rubber-0.9.7 generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
sml-rubber-0.9.8 generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
sml-rubber-0.9.9 generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf