How can I run nodebb on 2 urls?
-
@dunlix mind sharing your config.json? You're not running in dev mode are you?
-
@dunlix the second entry will just override the first one in that case. I'm more interested in if you configured the websockets.
Why not just redirect one address to the other?
-
@pitaj The second one definitely does not override it, because both work now. In some of my scenarios, my forum is blocked because it is categorized as a forum (FORUM.url) so a separate url works then. If it redirects then you know what will happen, it will still be blocked
-
@dunlix I guarantee you that it's not because there are two url entries in config.json
I know how NodeBB works and there is no support for multiple URLs.
If forum.example.com is blocked sometimes, but community.example.com isn't, then just serve at community and redirect from forum to community.
-
@dunlix session sharing shouldn't have anything to do with it. My guess is you put community second, so that is used as the URL, and it always works because it isn't blocked.
There might be some caching going on or you're running multiple instances or something. Without access to the sites I can't confirm anything.
-
@pitaj The url to the site is https://forum.gggrealms.ml.
the second I added is http://unblocked.gggrealms.ml -
@dunlix a few problems
Certificate mismatch for unblocked. Suggest having a separate cert for each subdomain.
Your http -> https redirect isn't working for unblocked.
I get a security error for both (even after bypassing the TLS mismatch error). Looks like your server is set up for an outdated version of TLS.
Also it looks like your URL in config.json has http instead of https.
Right now I can't access your sites because of the errors.
-
@dunlix it doesn't work on Firefox, Chrome, or Edge on my computer. On my phone, it doesn't work in Firefox, but it does work in Chrome.
Error in Firefox on my phone:
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please contact the website owners to inform them of this problem.
Websites prove their identity via certificates. Firefox Nightly does not trust https://forum.gggrealms.ml/ because its certificate issuer is unknown, the certificate is self-signed, or the server is not sending the correct intermediate certificates.
Error in Firefox on my computer:
NS_ERROR_NET_INADEQUATE_SECURITY
In this topic I made you should see the emoji image doesn't load. That's because it's trying to load from
http://unblocked.gggrealms.ml/plugins/nodebb-plugin-emoji/emoji/customizations/ea9804b2-6c62-4ca1-b8b4-0d79bd12eb10-touchicon-orig.png
which I think the browser blocks.It's loading from there because that's your url in config.json
-
Just a thought.... For internal use you can do whatever you want, but if you're publishing these urls onto the web I don't understand why you would seek this. It would be much simpler to just keep it in one URL and do a redirect from the other URL. Also it's bad for SEO if you have two urls pointing to the same forum generating "duplicate" content.
Maybe you can enlighten me.
-
I believe I made myself clear in this reply @Keng-Her.
Anyway I’ve got this working as I marked it solved.@dunlix said in How can I run nodebb on 2 urls?:
@pitaj The second one definitely does not override it, because both work now. In some of my scenarios, my forum is blocked because it is categorized as a forum (FORUM.url) so a separate url works then. If it redirects then you know what will happen, it will still be blocked