So, you’re on host A and ssh into host B. On host B, you run hugo server
. Also on host B, you “set up” https://code.1313.airetreat.co to “point to” localhost:1313.
If that’s the case (and I’m still not sure it is, as you use unfamiliar terms like “outside of Hugo” and “point host C to host B”):
- start hugo server with the correct
baseurl
, which would behttps://code.1313.airetreat.co
, possibly with the added directory as pointed out by @irkode . - also, provide a
bind
option to thehugo server
command, pointing to the public IP address of host B.
Finally: Accessing a HTTP host via HTTPS is a bit uncommon. And your setup is, in my opinion, overly complicated. If host B has a public IP anyway, why all this “pointing to” stuff? Why not use ssh forwarding (https://www.otorio.com/blog/back-to-basics-guide-to-ssh-tunneling/) if you’re ssh’ing to host B anyway?