anchor.diff:        }
       }
       <% if @application[:ssl_support] %>
  -    
  +
         server {
           listen   443;
   
  -        server_name  <%= server_alias %><% if server_alias.index('www-') == 0 -%> <%= server_alias.slice(4, a.length-4) %><% end -%>;
  +        server_name  <%= server_alias %><% if server_alias.index('www-') == 0 -%> <%= server_alias.slice(4, server_alias.length-4) %><% end -%>;
   
           <% if server_alias.index("-" + @application_name).nil? -%>
             root <%= @params[:docroot] %><%= server_alias %>/web;
           <% else -%>
  -          root <%= @params[:docroot] %><%= server_alias[0, a.index('-' + @application_name)] %>/web;
  -        <% end -%>           
  +          root <%= @params[:docroot] %><%= server_alias[0, server_alias.index('-' + @application_name)] %>/web;
  +        <% end -%>
   
           access_log  <%= node['nginx']['log_dir'] %>/<%= server_alias %>.access.log;
           error_log  <%= node['nginx']['log_dir'] %>/<%= server_alias %>.error.log;
  
positive.code:         <% if @application[:ssl_certificate_ca] -%>
          ssl_client_certificate /etc/nginx/ssl/<%= @params[:server_name] %>.ca;
          <% end -%>
          
          index index.php;
  
          server_tokens off;
  
negative.code: <%
  # Initialize default listen option
  listen_first = ''
  %>
  <% @params[:server_aliases].each do |server_alias| %>
    <% if server_alias != @application_name -%>
      server {
        listen   80;
  
        server_name <%= server_alias %><% if server_alias.index('www-') == 0 -%> <%= server_alias.slice(4, server_alias.length-4) %><% end -%>;
  
        <% if server_alias.index('-' + @application_name).nil? -%>
          root <%= @params[:docroot] %><%= server_alias %>/web;
        <% else -%>
          root <%= @params[:docroot] %><%= server_alias[0, server_alias.index('-' + @application_name)] %>/web;
        <% end -%>
  
        access_log <%= node['nginx']['log_dir'] %>/<%= server_alias %>.access.log;
        error_log <%= node['nginx']['log_dir'] %>/<%= server_alias %>.error.log;
  