Skip to content

Instantly share code, notes, and snippets.

@voxxit
Created August 26, 2015 19:00
Show Gist options
  • Select an option

  • Save voxxit/17d305a8ed68e77d8271 to your computer and use it in GitHub Desktop.

Select an option

Save voxxit/17d305a8ed68e77d8271 to your computer and use it in GitHub Desktop.
Working NGINX configuration; for use with HTTP/2 Dockerfile here: https://gist.github.com/voxxit/48217044067bb859248e
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log off;
sendfile on;
server {
listen 443 http2 default_server;
ssl_certificate cert.pem;
ssl_certificate_key cert.key;
location / {
root html;
index index.html index.htm;
}
}
}
daemon off;
@tomchentw
Copy link
Copy Markdown

It seems I can't get this to work for Chrome on Mac. However, changing L15 to

listen      443 ssl http2 default_server;

will do the trick.

I found the ssl option from this article:
https://www.nginx.com/blog/nginx-1-9-5/

@Nevraeka
Copy link
Copy Markdown

@tomchentw - Chrome won't run Http2 without https so that makes sense to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment