@PitaJ
{
"url": "https://forum.ZZZZ.com",
"secret": "xxxx",
"database": "mongo",
"port": ["4567","4568","4569"],
"mongo": {
"host": "127.0.0.1",
"port": "27017",
"username": "root",
"password": "xxx",
"database": "nodebb"
}
}
Groups as Subdomains via plugin?
-
Example:
GroupName.nodebbforum.comCan a plugin create subdomains as a group is created and the subdomain url direct to the group homepage? How approximately would that be done?
-
Sure, but not in NodeBB... you'd use nginx
You'd have to configure the server block to look for the subdomain and redirect the user's there.
-
So it would have to be like subreddits; reddit.com/r/groupname.
-
@bitspook with Nginx rules, you can have
abcd.example.com
redirect toexample.com/groups/abcd
-
Interesting.
But, if not a nodebb plugin creating those redirects in nginx rules, they would have to be made programmatically by some other means. -
@bitspook not necessarily. You can make a general rule that refers all subdomains not defined elsewhere to a group page. If that group page didn't exist, it will just go to the NodeBB 404 page.
-
You could do that, it's true. That said I'd like to kinda shunt people away from NginX. To hell with it and its antiquated ways. (okay okay, that is harsh-- it's very good at what it does and most likely it will continue doing that even a decade from now.)
Anyway, try out Caddy. I use Caddy in front of my web applications, which I run in the wonderful isolation of Docker containers, and caddy slaps an automatically generated SSL/TLS cert on them, yay! If you're running without encryption, you no longer have any excuse. Both Caddy and Let's Encrypt have made trivial work out of the previously quite harsh process of getting your site secured.