title: Why is Nginx 1.10.0 failing with multiple server blocks?
body: <p>I'm experiencing large problems with setting up a nginx 1.10.0 server on my Ubuntu 16.04 Node.<br>
  The first Virtualhost with the Configuration  </p>
  
  <pre><code>server {
     server_name lukvonstrom.de;
  
     server_tokens off;
  
     listen 80;
     listen [::]:80;
  
     return 301 https://lukvonstrom.de$request_uri;
  
  }
  
  
  
  
  server {
  
      server_name lukvonstrom.de;
  
      server_tokens off;
  
      listen 443 ssl http2;
      listen [::]:443 ssl http2;
  
      root /var/www/lukvonstrom.de/;
  
      index index.html;
  
      add_header X-Frame-Options SAMEORIGIN;
      add_header X-Content-Type-Options nosniff;
      add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
      add_header X-XSS-Protection "1; mode=block";
      add_header X-Robots-Tag none;
  
      ssl_certificate /etc/letsencrypt/live/lukvonstrom.de/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/lukvonstrom.de/privkey.pem;
  
      ssl_session_cache shared:SSL:50m;
      ssl_prefer_server_ciphers on;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  
      ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES$
  
      resolver 8.8.8.8;
      ssl_stapling on;
      ssl_stapling_verify on;
      ssl_trusted_certificate /etc/letsencrypt/live/lukvonstrom.de/fullchain.pem;
  
      ssl_dhparam /etc/nginx/ssl/dhparam4096.pem;
  
  }
  </code></pre>
  
  <p>is running with no problems. When I'm adding a new Host in the conf.d Directory in this example it is git.lukvonstrom.de with following config:</p>
  
  <pre><code>server {
      server_name git.lukvonstrom.de;
  
      server_tokens off;
  
      listen 80;
      listen [::]:80;
  
      return 301 https://git.lukvonstrom.de$request_uri;
  }
  
  server {
      server_name git.lukvonstrom.de;
      client_max_body_size 50m;
  
      location / {
              proxy_pass http://localhost:3000;
      }
  
      server_tokens off;
  
      listen 443 ssl http2;
      listen [::]:443 ssl http2;
  
      add_header X-Frame-Options SAMEORIGIN;
      add_header X-Content-Type-Options nosniff;
      add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
      add_header X-XSS-Protection "1; mode=block";
      add_header X-Robots-Tag none;
  
      ssl_certificate /etc/letsencrypt/live/git.lukvonstrom.de/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/git.lukvonstrom.de/privkey.pem;
      ssl_session_cache shared:SSL:50m;
      ssl_prefer_server_ciphers on;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES$
      resolver 8.8.8.8;
      ssl_stapling on;
      ssl_stapling_verify on;
      ssl_trusted_certificate /etc/letsencrypt/live/git.lukvonstrom.de/fullchain.pem;
      ssl_dhparam /etc/nginx/ssl/dhparam4096.pem;
  }
  }
  </code></pre>
  
  <p>nginx -t produces following output  </p>
  
  <pre><code>nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/nginx/conf.d/git.lukvonstrom.de.conf:44
  nginx: configuration file /etc/nginx/nginx.conf test failed
  </code></pre>
  
  <p>Is there anyone how could explain me why this error ocurrs?</p>
  
  <p>Thanks in advance,
  LukvonStrom</p>