项目作者: dockette

项目描述 :
:whale: Dockette Nginx SSL / HSTS / HTTP2 Dockerfile
高级语言: Dockerfile
项目地址: git://github.com/dockette/nginx.git
创建时间: 2015-12-04T19:36:02Z
项目社区:https://github.com/dockette/nginx

开源协议:MIT License

下载


Nginx

Nginx with SSL / HSTS and HTTP2 module.


Docker Stars
Docker Pulls

Discussion / Help

Join the chat

Default

Without any volumes Nginx listen IPv4 and IPv6 on both ports 80/443 and serve 444 No content.

Usage

  1. docker run \
  2. -p 80:80 \
  3. -p 443:433 \
  4. -v /path/to/site:/etc/nginx/sites.d/site \
  5. --name nginx \
  6. dockette/nginx:latest

Configuration

There are 2 main files:

Diffie-Hellman files:

Modules:

  • nginx-module-xslt
  • nginx-module-geoip
  • nginx-module-image-filter
  • nginx-module-njs

Http config

There are many files in /etc/nginx/conf.d.

These files are loaded manully in the main http section. You can extend only part of these files which you need.

Please do not place your custom configurations to this folder. There is a folder /etc/nginx/user.conf.d for this reason.

Take a look at nginx.conf.

Sites

Sites are loaded from folder /etc/nginx/sites.d.

There are 2 sites predefined:

The default returns http code 444 for every requests, it’s marked as default_server.

And the example site.

Sites config

For little fragments shared accross sites you can use folder /etc/nginx/site.conf.d.

User config

Your custom global http section configuration, /etc/nginx/user.conf.d. These files are loaded automatic from http section.

Take a look at nginx.conf.

SSL

By default nginx uses 2048 bits dhparam cypher. There is also 4096 bits pregenerated file.

This approach is for developing, for your stagging / production, please generate your own dhparam.

Tip

You should have A+ on SSL Server Test.