-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.dmfstuff.xyz
45 lines (33 loc) · 1.39 KB
/
todo.dmfstuff.xyz
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
## This is the Nginx config file for https://todo.dmfstuff.xyz
## In this case, Nginx is acting as a reverse proxy in front of a set of
## Docker containers, as defined in todo/production.yml.
## In order to avoid a conflict with Nginx, the Traefik container should listen
## on 127.0.0.1:801 and :4431, but can map to ports 80 and 443 inside the Docker
## network. In production.yml, do:
## traefik: ports: - "127.0.0.1:801:80" - "127.0.0.1:4431:4431"
server {
listen 80;
server_name todo.dmfstuff.xyz;
# Redirect the traffic to the corresponding
# HTTPS server block with status code 301
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name todo.dmfstuff.xyz;
# Store access logs
access_log /var/log/nginx/todo.dmfstuff.xyz.access.log combined;
# Store error logs
error_log /var/log/nginx/todo.dmfstuff.xyz.error.log error;
# Path of the SSL certificate
ssl_certificate /etc/letsencrypt/live/todo.dmfstuff.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/todo.dmfstuff.xyz/privkey.pem;
# Use the file generated by certbot command.
include /etc/letsencrypt/options-ssl-nginx.conf;
# Define the path of the dhparam.pem file.
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_set_header Host $host;
proxy_pass https://127.0.0.1:4431;
}
}