2024-09-28, 07:55 PM
(This post was last modified: 2024-09-28, 08:28 PM by 4r5hw45twh. Edited 8 times in total.)
(2024-09-28, 07:12 PM)TheDreadPirate Wrote: You can have separate subdomains in cloudflare with different settings for each subdomain.
You'd have an A and/or AAAA record that point to your domain and public IP. Then a bunch of cnames for each subdomain that point to your domain.
"...that point to your domain." Do you mean from my domain? Like, an A record from my subdomain that points to my public home IP?
On CloudFlare, I setup a tunnel for JF and it auto-added the subdomain I picked for it as a CNAME. My 2 A records currently are: "mydomain.com" and "www" and those hostnames are pointed to my domain registrar's DNS IP (I saw the URL they were set to on my domain host before activating CloudFlare with it and then used Dig to get the actual ipv4 of those). All 3 show as Proxied.
When testing a test subdomain that is NOT being proxied by CF, I have the A record of "test.domain.com" with it pointed to my home public IP and then I launch Caddy in PowerShell, but I can't connect from outside the network. My Caddyfile is:
Code:
test4.mydomain.com
reverse_proxy 127.0.0.1:8096
I run "caddy run" and my Caddy PowerShell window then says:
Code:
PS C:\Program Files\caddy> caddy run
2024/09/28 20:27:08.056 ←[34mINFO←[0m using adjacent Caddyfile
2024/09/28 20:27:08.058 ←[34mINFO←[0m adapted config to JSON {"adapter": "caddyfile"}
2024/09/28 20:27:08.058 ←[33mWARN←[0m Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies {"adapter": "caddyfile", "file": "Caddyfile", "line": 3}
2024/09/28 20:27:08.067 ←[34mINFO←[0m admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2024/09/28 20:27:08.067 ←[34mINFO←[0m tls.cache.maintenance started background certificate maintenance {"cache": "0xc00051b580"}
2024/09/28 20:27:08.067 ←[34mINFO←[0m http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}
2024/09/28 20:27:08.067 ←[34mINFO←[0m http.auto_https enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}
2024/09/28 20:27:08.068 ←[34mINFO←[0m http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}
2024/09/28 20:27:08.068 ←[34mINFO←[0m http enabling HTTP/3 listener {"addr": ":443"}
2024/09/28 20:27:08.069 ←[34mINFO←[0m http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}
2024/09/28 20:27:08.069 ←[34mINFO←[0m http enabling automatic TLS certificate management {"domains": ["test4.mydomain.com"]}
2024/09/28 20:27:08.070 ←[34mINFO←[0m tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:C:\\Users\\User\\AppData\\Roaming\\Caddy", "instance": "e6987cf2-53af-4c05-af72-8246f1a18f9b", "try_again": "2024/09/29 20:27:08.070", "try_again_in": 86400}
2024/09/28 20:27:08.070 ←[34mINFO←[0m tls finished cleaning storage units
2024/09/28 20:27:08.071 ←[34mINFO←[0m autosaved config (load with --resume flag) {"file": "C:\\Users\\User\\AppData\\Roaming\\Caddy\\autosave.json"}
2024/09/28 20:27:08.071 ←[34mINFO←[0m serving initial configuration