<commit_before>server {
  listen <%= http_port %>;
  <%= "server_name #{server_name};" if server_name %>
  rewrite ^(.*)$ https://$host:<%= https_port %>$1 redirect;
}

server {
  listen <%= https_port %>;
  <%= "server_name #{server_name};" if server_name %>
  ssl on;

  passenger_enabled on;
  passenger_min_instances 1;

  rails_env <%= rails_env %>;
  gzip on;
  gzip_disable "MSIE [1-6]\.";
  root <%= fetch :current_path %>/public;
  access_log <%= fetch :current_path %>/log/server.log;
  error_log <%= fetch :current_path %>/log/error.log error;

  #Need to change this accordingly once we move to rails3.1
  location ~* ^/(images|javascripts|stylesheets)/ {
    # Per RFC2616 - 1 year maximum expiry
    # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
    expires 1y;
    add_header Cache-Control public;

    # Some browsers still send conditional-GET requests if there's a
    # Last-Modified header or an ETag header even if they haven't
    # reached the expiry date sent in the Expires header.
    add_header Last-Modified "";
    add_header ETag "";
    break;
  }
}

<%= "passenger_pre_start https://#{server_name}:#{https_port}/;" if server_name %><commit_msg>ci | Subhas/Viky|Kavitha | Make nginx deployment work without server name<commit_after>server {
  listen <%= http_port %>;
  <%= "server_name #{server_name};" if fetch(:server_name) %>
  rewrite ^(.*)$ https://$host:<%= https_port %>$1 redirect;
}

server {
  listen <%= https_port %>;
  <%= "server_name #{server_name};" if fetch(:server_name) %>
  ssl on;

  passenger_enabled on;
  passenger_min_instances 1;

  rails_env <%= rails_env %>;
  gzip on;
  gzip_disable "MSIE [1-6]\.";
  root <%= fetch :current_path %>/public;
  access_log <%= fetch :current_path %>/log/server.log;
  error_log <%= fetch :current_path %>/log/error.log error;

  #Need to change this accordingly once we move to rails3.1
  location ~* ^/(images|javascripts|stylesheets)/ {
    # Per RFC2616 - 1 year maximum expiry
    # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
    expires 1y;
    add_header Cache-Control public;

    # Some browsers still send conditional-GET requests if there's a
    # Last-Modified header or an ETag header even if they haven't
    # reached the expiry date sent in the Expires header.
    add_header Last-Modified "";
    add_header ETag "";
    break;
  }
}

<%= "passenger_pre_start https://#{server_name}:#{https_port}/;" if fetch(:server_name) %>
{'fraction_non_alphanumeric': 0.14279902359641986, 'fraction_numerical': 0.01871440195280716, 'mean_word_length': 3.802734375, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5381390', 'n_tokens_mistral': 913, 'n_tokens_neox': 824, 'n_words': 220}