Sha256: b001ea9ed10a24ebf1d9f0b3e992abe75692fe44413e69067a1db2eeb5905256

Contents?: true

Size: 1.46 KB

Versions: 42

Compression:

Stored size: 1.46 KB

Contents

<%
  @path = "/etc/nginx/rubber/tools.conf"
%>


# This server is setup to serve http.
server
{
  listen <%= rubber_env.web_tools_port %>;
  server_name <%= rubber_env.full_host %>;
  root /var/www;

  rewrite (.*) https://$host:<%= rubber_env.web_tools_ssl_port %>$1 break;
}

# This server is setup to serve https.
server
{
  listen <%= rubber_env.web_tools_ssl_port %>;
  server_name <%= rubber_env.full_host %>;

  ssl                  on;
  <% if rubber_env.use_ssl_key %>
    ssl_certificate <%= Rubber.root %>/config/<%= rubber_env.domain %>.crt;
    ssl_certificate_key <%= Rubber.root %>/config/<%= rubber_env.domain %>.key;
  <% else %>
    ssl_certificate  /etc/ssl/certs/ssl-cert-snakeoil.pem;
    ssl_certificate_key  /etc/ssl/private/ssl-cert-snakeoil.key;
  <% end %>  

  auth_basic            "Rubber Admin Tools";
  auth_basic_user_file  <%= Rubber.root %>/config/<%= rubber_env.app_name %>.auth;

  client_max_body_size 10M;
  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/tools/*.conf;
}

Version data entries

42 entries across 21 versions & 1 rubygems

Version Path
rubber-2.0.8 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.8 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.7 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.7 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.6 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.6 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.5 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.5 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.4 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.4 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.3 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.3 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.2 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.2 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.1 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.1 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.0 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.0 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.0.pre12 templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
rubber-2.0.0.pre12 templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf