From 363cdd02df34e251f3102734a79497cd96324abb Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 2 Apr 2020 13:40:01 -0500 Subject: [PATCH] Improve proxy documentation --- doc/FAQ.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/FAQ.md b/doc/FAQ.md index 29e5c505..eccfbed3 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -65,23 +65,29 @@ only to HTTP requests. You can use [Let's Encrypt](https://letsencrypt.org/) to get an SSL certificate for free. -## How do I access web services? +## How do I securely access web services? code-server is capable of proxying to any port using either a subdomain or a -subpath. +subpath which means you can securely access these services using code-server's +built-in authentication. ### Sub-domains -Set up a wildcard certificate for your domain and a wildcard DNS entry (or you -can configure each subdomain individually for the ports you expect to use). +You will need a DNS entry that points to your server for each port you want to +access. You can either set up a wildcard DNS entry for `*.` if your domain +name registrar supports it or you can create one for every port you want to +access (`3000.`, `8080.`, etc). + +You should also set up TLS certificates for these subdomains, either using a +wildcard certificate for `*.` or individual certificates for each port. Start code-server with the `--proxy-domain` flag set to your domain. ``` -code-server --proxy-domain coder.com +code-server --proxy-domain ``` -Now you can browse to `.coder.com`. Note that this uses the host header so +Now you can browse to `.`. Note that this uses the host header so ensure your reverse proxy forwards that information if you are using one. ### Sub-paths