From 28d5697b37599564f1fa98506300d9b8dc0401cf Mon Sep 17 00:00:00 2001 From: ytqh Date: Wed, 28 May 2025 20:47:39 +0800 Subject: [PATCH] update --- docker/nginx/conf.d/langbot.conf.template | 25 +++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/docker/nginx/conf.d/langbot.conf.template b/docker/nginx/conf.d/langbot.conf.template index 37667f8674..d123bf7bab 100644 --- a/docker/nginx/conf.d/langbot.conf.template +++ b/docker/nginx/conf.d/langbot.conf.template @@ -1,5 +1,6 @@ # Configuration for langbot.lefeng.school subdomain +# HTTP server for langbot.lefeng.school server { listen ${NGINX_PORT}; server_name langbot.${NGINX_SERVER_NAME}; @@ -10,21 +11,33 @@ server { return 200 'KiDk4c0uzgf4zc8l'; } - # Main langbot service + # ACME challenge location + ${ACME_CHALLENGE_LOCATION} + + # Serve langbot on HTTP temporarily for certificate generation location / { proxy_pass http://host.docker.internal:5300; include proxy.conf; } - # Callback endpoint location /callback { proxy_pass http://host.docker.internal:2290; include proxy.conf; } +} - # placeholder for acme challenge location - ${ACME_CHALLENGE_LOCATION} - - # placeholder for https config defined in https.conf.template +# HTTPS server (will be added after certificate is obtained) +server { ${HTTPS_CONFIG} + server_name langbot.${NGINX_SERVER_NAME}; + + location / { + proxy_pass http://host.docker.internal:5300; + include proxy.conf; + } + + location /callback { + proxy_pass http://host.docker.internal:2290; + include proxy.conf; + } } \ No newline at end of file