config.json updated, `base_url` and `relative_path` no longer exist
-
Re: gh#1984
The configuration file was recently updates to be simpler, among other changes,
url
is the main config value that points to your address. NodeBB will automatically figure out the port usage and relative path if provided.port
is now optional. If it is not specified, it will be inferred from theurl
, if it is not specified in the url (e.g. you're using a reverse proxy) and you still want to listen to a non-4567 port, specify aport
value, NodeBB will follow it. ThePORT
environment variable is unaffected.bcrypt_rounds
andupload_path
are defaulted to12
and/public/uploads
respectively. Leave them in config.json if you want them to be different.NodeBB's upgrade script will transparently handle this change, although if you have plugins relying on
base_url
, you'll need to update them to listen forurl
instead.Full details here: https://docs.nodebb.org/en/latest/configuring/config.html
-
Hi,
so if I do understand it right - NodeBB is now supporting subfolder installations? If yes, how do I configure NodeBB to do so? Cant figure it out from the docs...
-
Okay, and how do I have to configure NGINX? Just:
server { server_name domain.tld; location /forum/ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:<port>/; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
?
-
@silasrech If you put
location
as/forum/
, nginx will remove that portion of the URL when proxying, and NodeBB will actually see requests for/topic/
/category
, etc, so if you wish, you can do that and change theurl
to be without the subfolder.OR
Leave it as
location /
, and have theurl
property in the config have the subfolder. -
Okay, thanks. Merry Christmas and Happy New Year by the way
-
Finally upgraded to 0.6.1 from 0.5.7. First I added the port (in my case 8080) to the URL string as described in this thread. That screwed up SSO. Both google and facebook. After, I went back and manually added "port" setting into config.json, SSO seems functional. This appears to be a bug or a logical conflict. Basically SSO is not functional unless your URL string is exactly how you access nodeBB from the outside.
-
@Baerrus This is what it's supposed to be due to my understandings.
The
url
attribute needs to be the URL how you access NodeBB from the outside.
Theport
attribute defaults to4567
(or to port specified withinurl
if specified) and is the port NodeBB attaches to on localhost.Some examples:
{"url": "http://example.com:8080"}
NodeBB binds to 8080 and expects no reverse-proxy thus from the outside you access it viahttp://example.com:8080
{"url": "http://example.com"}
NodeBB binds to 4567 and expects outside-access to be viahttp://example.com
{"url": "http://example.com", "port": 8080}
NodeBB binds to 8080 and expects outside-access to be viahttp://example.com
-
@frissdiegurke Knowing what I know now, @julian post can be construed to contain all the information :). I would word it differently though as SSO is probably veyr widely used. And if so, then calling port optional is...well, still technically correct.