Help understanding the structure of using discourse + static website

AI-generated summary

anomaly47 is seeking help to understand how to structure a static website around a Discourse installation on DigitalOcean. They want to create a static page at example.com with a link to discourse.example.com.

purldator suggests creating a server block for example.com and provides a link to a Meta Discourse topic on running other websites on the same machine as Discourse.

anomaly47 clarifies their desired structure, wanting to link to discourse.example.com from example.com and have the same header on both sites. purldator advises on setting up Nginx to delegate traffic based on the domain and provides a sample Nginx configuration file. They also explain that the subdomain discourse.example.com needs to point to the DigitalOcean droplet’s IP address and provide links to relevant tutorials. Additionally, purldator shares a link to a Meta Discourse topic that may help with customizing the header.

Forgive me if this is really juvenile. I’m new to ruby dev.

So I have a beautiful installation of discourse up and running on digitalocean. I am waiting for my DNS servers to propogate now that I’ve directed them at my discourse IP on digitalocean.

The forum is working beautifully.

How and where can I build static content of the website around discourse?
E.g., I want someone to hit a static page prior to going to discourse, and then click "forum’ in the nav.

Normally I would just open up the host and add the pages there, but I’m unsure how to do that on digitalocean.

I am thinking that depends on if a subdomain is pointing to your Discourse install (eg, discourse.example.com). If you want your top-tier domain (example.com) to have that link, then you only need to make a server block for example.com and your static page.

Hey purldator, thanks for taking some time to help me out.

Here is the structure I’d like to have:

example.com

contains all the static site stuff

discourse.example.com

contains discourse

I want to just link to discourse.example.com from example.com and then have the same header on discourse.example.com if that makes sense.

Do I just need to point my subdomain at the discourse IP address?
Will that work properly? Is there anything I need to do with the NS records?

Thanks again.

Here’s a completed example file for Nginx to be in front of the Docker container and delegate where the client goes based on if they call discourse.mydomain.com or mydomain.com. At the bottom of that file, you want to make a second server block for example.com. Go to the link I have in my first post and check out the section titled Create a NGINX ‘site’. That shows you how to create the server block for your top-level domain. Or, you can also check out this DO tutorial for the exact same thing, which shows you how to test the new server block.

As for the NS records, your sub domain needs to point to your DO droplet’s IP address. Because Nginx is the one pointing the client to the correct site, based on if they call discourse.mydomain.com or just mydomain.com. This link clarifies what I mean.

EDIT: As for the header, this might be what you’re looking for as it was asked today from someone else too.