<commit_before>#
# Generated by chef for <%= node[:fqdn] %>. Do not modify by hand
#
server {
  listen <%= @params[:server_port] || node['osl-nginx']['server_port'] %>;
  server_name <%= @params[:name] %><% @server_aliases.each do |a| %> <%=a%><% end %>;
  root <%= @params[:directory] %>;
  <% if @params[:directory_index] %>
  index <% @params[:directory_index].each do |i| %> <%= i %><% end %>;
  <% else %>
  index <% node['osl-nginx']['directory_index'].each do |i| %> <%= i %><% end %>;
  <% end %>
  <% if @params[:include_config] then  %>

  include <%= "#{node['nginx']['dir']}/sites-available/#{@params[:include_name] || @params[:name]}_include.conf" %>;
  <% end %>
  <% if @params[:directive_http] %>

  <% @params[:directive_http].each do |d| %>
  <%= d %>
  <% end %>
  <% end %>
  <% if !@params[:custom_logs] then %>

  access_log <%= "#{node['nginx']['log_dir']}/#{@params[:name]}/access/access.log" %>;
  error_log <%= "#{node['nginx']['log_dir']}/#{@params[:name]}/error/error.log" %>;
  <% end %>
}

<% if @params[:ssl_enable] and @params[:cert_file] and @params[:cert_key] %>
server {
  listen 443 ssl;
  server_name <%= @params[:name] %><% @server_aliases.each do |a| %> <%=a%><% end %>;
  root <%= @params[:directory] %>;
  <% if @params[:directory_index] %>
  index <% @params[:directory_index].each do |i| %> <%= i %><% end %>;
  <% else %>
  index <% node['osl-nginx']['directory_index'].each do |i| %> <%= i %><% end %>;
  <% end %>

  ssl_certificate <%= @params[:cert_file] %>;
  ssl_certificate_key <%= @params[:cert_key] %>;
  <% if @params[:include_config] then  %>
<commit_msg>Use a default directory to match what we actually say in the docs<commit_after>#
# Generated by chef for <%= node[:fqdn] %>. Do not modify by hand
#
server {
  listen <%= @params[:server_port] || node['osl-nginx']['server_port'] %>;
  server_name <%= @params[:name] %><% @server_aliases.each do |a| %> <%=a%><% end %>;
  root <%= @params[:directory] || "/var/www/#{@params[:name]}" %>;
  <% if @params[:directory_index] %>
  index <% @params[:directory_index].each do |i| %> <%= i %><% end %>;
  <% else %>
  index <% node['osl-nginx']['directory_index'].each do |i| %> <%= i %><% end %>;
  <% end %>
  <% if @params[:include_config] then  %>

  include <%= "#{node['nginx']['dir']}/sites-available/#{@params[:include_name] || @params[:name]}_include.conf" %>;
  <% end %>
  <% if @params[:directive_http] %>

  <% @params[:directive_http].each do |d| %>
  <%= d %>
  <% end %>
  <% end %>
  <% if !@params[:custom_logs] then %>

  access_log <%= "#{node['nginx']['log_dir']}/#{@params[:name]}/access/access.log" %>;
  error_log <%= "#{node['nginx']['log_dir']}/#{@params[:name]}/error/error.log" %>;
  <% end %>
}

<% if @params[:ssl_enable] and @params[:cert_file] and @params[:cert_key] %>
server {
  listen 443 ssl;
  server_name <%= @params[:name] %><% @server_aliases.each do |a| %> <%=a%><% end %>;
  root <%= @params[:directory] || "/var/www/#{@params[:name]}" %>;
  <% if @params[:directory_index] %>
  index <% @params[:directory_index].each do |i| %> <%= i %><% end %>;
  <% else %>
  index <% node['osl-nginx']['directory_index'].each do |i| %> <%= i %><% end %>;
  <% end %>

  ssl_certificate <%= @params[:cert_file] %>;
  ssl_certificate_key <%= @params[:cert_key] %>;
  <% if @params[:include_config] then  %>

{'fraction_non_alphanumeric': 0.27038369304556353, 'fraction_numerical': 0.0017985611510791368, 'mean_word_length': 4.646362098138748, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 95, 'https://': 0, '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': '5308272', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1218, 'n_words': 224}