Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

support --proxy-domain and add subdomain DNS zone #1

Closed
bpmct opened this issue Jun 13, 2021 · 5 comments · Fixed by #2
Closed

support --proxy-domain and add subdomain DNS zone #1

bpmct opened this issue Jun 13, 2021 · 5 comments · Fixed by #2
Assignees
Labels
enhancement New feature or request

Comments

@bpmct
Copy link

bpmct commented Jun 13, 2021

https://github.com/cdr/code-server/blob/main/docs/FAQ.md#sub-domains

@alec-hs alec-hs self-assigned this Jun 13, 2021
@alec-hs alec-hs added the enhancement New feature or request label Jun 13, 2021
@alec-hs
Copy link
Owner

alec-hs commented Jun 14, 2021

99% of the way there on this - just one question @bpmct.

When launching the code-server service with --proxy-domain $domain should the proxy domain/ subdomains also be pointing to the same ip/port in the Caddy file like below?

Wildcard Setup

code-server.mydomain.com, *.proxydomain.com {
  reverse_proxy 127.0.0.1:8080
  tls {
    dns cloudflare API_TOKEN
  }
}

Specific Port Setup

code-server.mydomain.com, 963.proxydomain.com, 456.proxydomain.com {
  reverse_proxy 127.0.0.1:8080
  tls {
    dns cloudflare API_TOKEN
  }
}

@bpmct
Copy link
Author

bpmct commented Jun 15, 2021

yep exactly!! Is there a way I can test it?

@alec-hs
Copy link
Owner

alec-hs commented Jun 15, 2021

Yeah sure - the sub-domains branch has all the changes - getting a strange "Too many redirects" issue at the moment - going to solve that before merging into main.

Also the branch is still pulling the changed service file from the main branch so will have to manually edit that until merged.

Is there any requirement for the proxy domain to be different to the main domain? For example - can code-server be running at dev.mydomain.com then proxy domain also be 3000.mydomain.com?

@alec-hs
Copy link
Owner

alec-hs commented Jun 15, 2021

Solved in discussion on Slack - issue was cannot currently have code-server on a subdomain of the proxy domain.

@alec-hs alec-hs linked a pull request Jun 15, 2021 that will close this issue
@alec-hs
Copy link
Owner

alec-hs commented Jun 15, 2021

Tested and now working.

@alec-hs alec-hs closed this as completed Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants