diff --git a/deploy.sh b/deploy.sh index e9f1f62..a2d2d96 100755 --- a/deploy.sh +++ b/deploy.sh @@ -205,16 +205,19 @@ ZORAXY_APP } ZORAXY_DNS - # Generate www subdomain config (static site, no upstream) + # Generate www subdomain config (proxied to binary for landing page + ACME support) cat > "$TARGET_DIR/config/zoraxy/conf/proxy/www.$DOMAIN.config" < ` +const landingPageHTML = ` + + + + + NextWorkspace — Your Self-Hosted Workspace for Startups + + + +
+

NextWorkspace

+

Your Self-Hosted Workspace for Startups

+
nextwks.eu
+
+
+

Components

+ +
+

Built with AI

+

NextWorkspace was developed with assistance from AI coding tools, using DeepSeek as the provider and OpenCode as the development framework.

+
+
+ + +` + const launcherHTML = ` @@ -437,8 +520,14 @@ func main() { } } - // Default: redirect to launcher + // Default: serve landing page for www subdomain, redirect to launcher otherwise + domain := os.Getenv("DOMAIN") mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + if strings.HasPrefix(r.Host, "www.") || (domain != "" && r.Host == "www."+domain) { + w.Header().Set("Content-Type", "text/html; charset=utf-8") + fmt.Fprint(w, landingPageHTML) + return + } http.Redirect(w, r, "/home/", http.StatusFound) })