anchor.diff:    access_log  <%= @log_directory %>/gitlab_pages_access.log gitlab_access;
     error_log   <%= @log_directory %>/gitlab_pages_error.log;
   
  -	# 1. Try to get /project/ to => shared/pages/${group}/public/ or index.html
  -	# 2. Try to get / to => shared/pages/${group}/${host}/public/ or index.html
  -	location ~ ^/([^/]*)(/.*)?$ {
  -		try_files "/$1/public$2"
  -							"/$1/public$2/index.html"
  -							"/${host}/public/${uri}"
  -							"/${host}/public/${uri}/index.html"
  -							=404;
  -	}
  +  # 1. Try to get /project/ to => shared/pages/${group}/public/ or index.html
  +  # 2. Try to get / to => shared/pages/${group}/${host}/public/ or index.html
  +  location ~ ^/([^/]*)(/.*)?$ {
  +    try_files "/$1/public$2"
  +              "/$1/public$2/index.html"
  +              "/${host}/public/${uri}"
  +              "/${host}/public/${uri}/index.html"
  +              =404;
  +  }
   
  -	# Define custom error pages
  -	error_page 403 /403.html;
  -	error_page 404 /404.html;
  +  # Define custom error pages
  +  error_page 403 /403.html;
  +  error_page 404 /404.html;
   
     <%= @custom_gitlab_server_config %>
   }
  
positive.code: <% @listen_addresses.each do |listen_address| %>
    listen <%= listen_address %>:<%= @listen_port %><% if @https %> ssl spdy<% end %>;
  <% end %>
  	server_name  ~^(?<group>.*)\.<%= @fqdn_regex %>$;
    server_tokens off; ## Don't show the nginx version number, a security best practice
    root <%= @pages_path %>/${group};
  
  	## Disable symlink traversal
  	disable_symlinks on;
  
    <% if @https %>
    ## Strong SSL Security
  
negative.code: <% end %>
    server_name  ~^(?<group>.*)\.<%= @fqdn_regex %>$;
    server_tokens off; ## Don't show the nginx version number, a security best practice
    return 301 https://$http_host:<%= @port %>$request_uri;
    access_log  <%= @log_directory %>/gitlab_pages_access.log gitlab_access;
    error_log   <%= @log_directory %>/gitlab_pages_error.log;
  }
  