If you check your config file, it says "listen to port 80"(HTTP) and "SSL on". When you point your browser to http://localhost, it tries to connect via HTTP but since you have mentioned SSL it expects to use SSL. 
What you can do is have two separate servers, something like this:
server {
  listen 80;
  // other directives...
}
server {
  listen 443;
  ssl on;
  // SSL directives...
  // other directives...
}