Permalink
Find file
26cea48 Dec 3, 2016
182 lines (130 sloc) 3.67 KB
# GENERATED BY ./generate.sh via example/config.sh - DO NOT MODIFY DIRECTLY
resolver 172.17.42.1;
server {
listen 80;
server_name example.com;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
set $force_proto "https";
include conf.d/force-proto.include;
# let the proxied server handle whether this "body" is too large
client_max_body_size 0;
proxy_pass http://wordpress-example.docker;
include conf.d/proxy-pass.include;
}
}
server {
listen 80;
server_name blog.example.com;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
return 301 $proto://example.com$request_uri;
}
}
server {
listen 80;
server_name www.example.com;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
return 301 $proto://example.com$request_uri;
}
}
server {
listen 80;
listen 443 ssl http2;
ssl_certificate /path/to/othercert.pem;
ssl_certificate_key /path/to/othercert.key;
include conf.d/ssl.include;
server_name other.example.com;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
# let the proxied server handle whether this "body" is too large
client_max_body_size 0;
proxy_pass http://some-external-host.corp.example.com;
include conf.d/proxy-pass.include;
}
}
server {
listen 80;
server_name munin.example.com;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
set $force_proto "https";
include conf.d/force-proto.include;
}
}
server {
listen 80;
server_name bugzilla.example.com;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
set $force_proto "https";
include conf.d/force-proto.include;
# let the proxied server handle whether this "body" is too large
client_max_body_size 0;
proxy_pass https://bugzilla-example.docker;
include conf.d/proxy-pass.include;
}
}
server {
listen 80;
server_name www.example.net;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
return 301 $proto://example.com$request_uri;
}
}
server {
listen 80;
listen 443 ssl http2;
ssl_certificate /etc/letsencrypt/live/letsencrypt.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/letsencrypt.example.com/privkey.pem;
include conf.d/ssl.include;
server_name letsencrypt.example.com;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
set $force_proto "https";
include conf.d/force-proto.include;
}
location ~ /.well-known {
root /static/letsencrypt-webroot;
index index.html index.htm index;
try_files $uri $uri/ $uri.html =404;
add_header Cache-Control "no-cache";
}
}
server {
listen 80;
listen 443 ssl http2;
ssl_certificate /path/to/somecert.pem;
ssl_certificate_key /path/to/somecert.key;
include conf.d/ssl.include;
server_name public.example.com;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
set $force_proto "http";
include conf.d/force-proto.include;
root /static/public;
index index.html index.htm index;
try_files $uri $uri/ $uri.html =404;
add_header Cache-Control "public";
}
}
server {
listen 80;
server_name example.net;
include conf.d/set-proto.include;
location / {
# start a default "location" block to allow for "add_header", etc.
return 301 $proto://example.com$request_uri;
}
}