dpl/gateway-site.conf

29 lines
1.1 KiB
Plaintext

server {
listen 80;
server_name c2.deeplink-subscribe.com;
include /etc/nginx/dpl-cloudflare-realip.conf;
location ^~ /.well-known/acme-challenge/ { root /var/lib/dpl-sgw/acme; }
location / { return 301 https://$host$request_uri; }
}
server {
listen 443 ssl;
server_name c2.deeplink-subscribe.com;
include /etc/nginx/dpl-cloudflare-realip.conf;
ssl_certificate /etc/dpl-letsencrypt/live/c2.deeplink-subscribe.com/fullchain.pem;
ssl_certificate_key /etc/dpl-letsencrypt/live/c2.deeplink-subscribe.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
# Public gateway serves subscriptions only; administration stays on loopback.
access_log off;
error_log /var/log/nginx/dpl-subscribe-error.log crit;
location ~ ^/s/([^/]+)/?$ {
rewrite ^/s/([^/]+)/?$ /api/v1/client/subscribe?token=$1 break;
proxy_pass https://127.0.0.1:18443;
include /etc/nginx/dpl-subscribe-proxy.conf;
}
location = /api/v1/client/subscribe {
proxy_pass https://127.0.0.1:18443;
include /etc/nginx/dpl-subscribe-proxy.conf;
}
location / { return 404; }
}