How do you get to the Nginx configuration
-
Root directive in ngninx virtual hosts are ignored as all requests are immediately proxied to Node. It can even be ommitted.
-
@Scuzz yeah after changing the document i do, but i'm not sure if i'm writing this correctly.
root /root/mynodebb;
and then in terminal i'm doing right after
service nginx restart Restarting nginx: nginx.
@BarveyHirdman, I'm not sure what that means for me. Do i need to change the directory that NodeBB is in? Is that possible?
-
I wanted to reply to this
@Scuzz said:
As shown above, mine is incorrect so that shouldnt make a difference. But you might want to change it anyway just in case it is causing a problem.
But apparently I didn't.
-
oh i see. yeah no matter what i write into that line it doesnt seem to make a difference to the website. weird.
yeah at this point i'm stumped. I have no idea why @barveyhirdman can see my website performing correctly and I can't. Not on my computer or my iphone.
i can send you a sudo username and you can muck around if you want.
-
@kevin just an idea, which actually helped me:
Edit your public/config.json file:
{ "relative-path": "", "websocket": { "address": "198.199.96.7", "port": "4567" } }
I'm not sure but maybe it's possible the websocket connection goes to some place it's not getting picked up.
-
wrote that in root/mynodebb/public/config.json
restarted node and nginx
nothing.... -
I'm stuck to be honest, I'll try and think about this some more when I get home.
-
@Scuzz Yeah turns out the nginx package was actually 1.4.4, but nginx-common and nginx-full were still 1.1.9. It can be confusing, I made the same mistake at home too.
-
Darn -- that's what I get for not staying up until 4am in the morning.
As you have realized:
root
doesn't do anything in your nginx config. It was a relic left over from other config files I've used in the past (it's required for nginx serving php scripts, for example). Now, as we're using nginx as a proxy, theroot
directive is no longer required and can be safely omitted. -
@julian No worries, daytime for me is nighttime for you.
-
@BarveyHirdman said:
@kevin just an idea, which actually helped me:
Edit your public/config.json file:
{ "relative-path": "", "websocket": { "address": "198.199.96.7", "port": "4567" } }
I'm not sure but maybe it's possible the websocket connection goes to some place it's not getting picked up.
Is this response regarding the domain situation which requires a login even if you already logged in to one of the other ones?
For instance. I visited californiamotorcycleforum.com which is @kevin website without the www. I then logged in using the californiamotorcycleforum.com domain. After I did that I visited www.californiamotorcycleforum.com (using the www) and it required me to log in again.
I have the same problem on my site. www.snapseepc.com and snapseepc.com both require a log-in, even if you have visited the other site already and logged in.
So I have tried messing with my DNS forwarding, and that doesn't seem to work. It may be because we are running nginx, I am not 100% sure on that though. the nodebb forums don't have this problem because the domain is always the same. community.nodebb.org - there is no www.community.nodebb.org .
I think that a solution might be to set up a forward in one of the config files, does anybody know how to do something like that? Make it so the snapseepc.com domain will always forward to www.snapseepc.com
-
@snapsee This is not a problem with nginx, it is because web servers and browsers consider "www.snapseepc.com" and "snapseepc.com" as separate sites.
You'll need to redirect requests for www.* to snapseepc.com, or vice versa.