In a discussion titled “Using Multiple Websites with Nginx + Discourse,” user Zarken seeks help adding a secondary site (addons.gidentity.net or gidentity.net/addons/) alongside their existing Discourse installation. They’ve followed guides but encounter “site cannot be reached” errors. fefrei advises setting up a separate Nginx instance on the host and confirms that for a non-Discourse site, a new configuration file (e.g., “blahblah.conf”) is needed. Zarken confirms using the same guide for Discourse and asks if reusing the config structure works — fefrei clarifies it depends on the target site’s nature. Zarken reveals the second site is custom-coded and shares a tutorial they tried. fefrei asks for the domain, leading to the discovery that DNS for addons.gidentity.net was missing — Zarken confirms this was the issue after adding an A record pointing to 185.38.148.133fefrei. After fixing DNS, Zarken reports the site loads but redirects to the main Discourse domain. fefrei suspects misconfigured Nginx — suggesting checking if the config file is symlinked to sites-enabled and whether Nginx was reloaded successfully. pfaffman adds that Let’s Encrypt must be configured on the host’s Nginx, not the Discourse container, and fefrei provides a tutorial link for SSL setup. The thread ends with Zarken sharing their DNS records and awaiting further troubleshooting.
I’ve managed to set up Nginx to use Discourse as its main site… however i’m having trouble adding addition sites with a prefix, for example addons.domain.com
I’ve followed multiple tutorials online and all of them cause the site to not be reached? (my Discourse site is still reachable) how could i fix this?
Alternatively is there a way i could host a HTML site within the Discourse files? for example domain.com/othersite? when i’ve tried to do this in the past it just links to my discourse site with a page not found error.
Hey, thats what i used for making Discourse work with it..
I was unsure whether i’d do that again for another address? if i do would i just use virtually the same code and change the filename from “discourse.conf” to “blahblah.conf”?
What do you want to run on the second domain? If it’s Discourse, you’ll have to install a second instance (or use multisite), and have a second, similar configuration file. If it’s something different, the configuration will be different, of course
Yeah its something different. Just something i’ve coded myself.
Which is where i’m having problems… i’ve tried multiple guides to try and add a 2nd site using a prefix like “addons.” but it doesn’t work (Site cannot be reached)?
Thought I had this sorted but apparently not.
Going to the url addons.gidentity.net no longer displays an error however it automatically forwards to gidentity. net (remove space after . - posting requirements) what could be the cause of this?
Such a redirect probably means that your configuration isn’t appplying and the wrong one is used.
Did you link your new file to show up in the sites-enabled-folder?
Did you remember to reload Nginx after that? Did that succeed or show an error?
If these steps don’t help, can you post your configuration files here so we can have a look? (They shouldn’t contain sensitive information, but please double-check.)