sandstorm-io / sandstorm

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager.
https://sandstorm.io
Other
6.72k stars 705 forks source link

domain connect to subdomain #3469

Open Bianconiglio opened 3 years ago

Bianconiglio commented 3 years ago

Hi, using sandstorm i saw the following case:

the user uses wordpress in sandstorm and creates his blog.

This blog can be reached through the subdomain created by the platform.

is there a way I can connect a top level domain (external not connected to sandstorm) to this subdomain without having to redirect from the sandstorm platform?

maybe creating a configuration in nginx that allows to associate the subdomain with the top level domain?

ocdtrekkie commented 3 years ago

So, blogs on Sandstorm like WordPress and Ghost use a Sandstorm feature for static publishing. Inside the app, it will provide instructions to enter the correct DNS records to connect a subdomain unrelated to Sandstorm to the static publishing for that particular grain. For example, http://blog.jacobweisz.com/ is actually pointed to a Ghost grain on a Sandstorm server.

There are some upsides and downsides to this approach: Especially if you are using a CDN like Cloudflare, these blogs can handle significant capacity and cache really well. They're also incredibly secure, as the WordPress code is never actually running when visitors visit the blog, they're just getting a static print of it's output. However, dynamic features don't work via this method, so commenting is currently not implemented, for instance.

Bianconiglio commented 3 years ago

thank you for information