nginx as reverse proxy (nginx+certbot+nodebb)
-
Hi Guys,
I'm asking this question on behalf of a friend (this is also his forum account)
I'm trying to help setup nginx as reverse proxy to our website KEEN.wtf
I've now tried several things and I have the feeling i'm pretty close to get it working, but it's not working yetSo I've now set up NGINX as per the usual guides. This works, when I visit keen.wtf I see the default 'Welcome to Nginx' page. Now the next step would be getting our actual nodebb to show up.
This is how the the nginx serverblock looks now:
This is our current config.json:
{
"url": "http://keen.wtf",
"secret": "secret key",
"database": "mongo",
"port": 4567,
"mongo": {
"host": "127.0.0.1",
"port": "27017",
"username": "",
"database": ""
}
}When running 'sudo nginx -t' this is the result:
nginx: [warn] conflicting server name "keen.wtf" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "keen.wtf" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "keen.wtf" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "keen.wtf" on 0.0.0.0:443, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successfulNow the big question, what am I doing wrong?
Thanks in advance!!
-
Found a "hidden" file in the nginx/sites-available and nginx/site-enabled folders.
Deleted that and now I only have one nginx warning left.When running 'sudo nginx -t' this is the result:
nginx: [warn] conflicting server name "keen.wtf" on 0.0.0.0:80, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successfulEDIT:
Ok i have now also removed the return 301 (line 4) in the nginx server block, I think it also conflicts with the rewrite in line 5.
Restarted server/nginx/nodebb
And boom HTTPS works.Next thing though, we still don't get to see a greenlock in firefox or chrome. It says something about the site only being partially secure. Any idea why that happens?
Now also fixed, our logo was still referring to a http link, removed the domain and just made it point to src="/assets/uploads/system/site-logo.png"PS. any other tips or adjustments on the config files is also welcome