forked from iainbullock/tesla-http-proxy-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx_tesla.conf
45 lines (35 loc) · 1.4 KB
/
nginx_tesla.conf
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
server {
listen 80;
listen [::]:80;
server_name tesla.example.com; # Change to match your own FQDN
return 302 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
server_name tesla.example.com; # Change to match your own FQDN
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
ssl_session_tickets off;
# Change this to point to your own ssl certificates. I'm using Cloudflare, but you could use DuckDNS etc
# Make sure your site is working properly using ssl before proceeding with installation of tesla_http_proxy_docker
ssl_certificate /etc/nginx/ssl/cloudflare/cert.pem;
ssl_certificate_key /etc/nginx/ssl/cloudflare/key.pem;
# dhparams file
#ssl_dhparam /data/dhparams.pem;
proxy_buffering off;
# root /usr/share/nginx/tesla_http_proxy;
# index index.html index.htm;
resolver 127.0.0.11;
set $target __PROXYHOST__;
# temporary Flask app for initial auth
location / {
proxy_pass http://192.168.0.3:8099; # Change to hostname or IP of your Docker host
}
# static public key for Tesla
location /.well-known/appspecific/com.tesla.3p.public-key.pem {
root /usr/share/nginx/tesla_http_proxy;
try_files /com.tesla.3p.public-key.pem =404;
}
}