How do you get to the Nginx configuration


  • @BarveyHirdman, no keeping the browser on the homepage for over 20 seconds doesnt seem to do anything.

    @Scuzz, I think i understand. one sec..


  • @scuzz yeah i have no idea if i'm doing this correctly.

    root 198.199.96.7/root/mynodebb/install/; ???


  • @kevin What is the location of your nodebb folder?

    On my server the nodebb folder where the nodebb app is is in

    /var/www/bitbangers.co.uk/htdocs/NodeBB
    

    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.

    Change

    upstream nodebb {
        server 198.199.96.7:4567
    }
    

    to

    upstream nodebb {
        server 127.0.0.1:4567;
    }
    

    You also missed off a ; in your config when declaring the server ipaddress.


  • @Scuzz its root/mynodebb/
    I followed the NodeBB for dummies tutorial and installed it in "mynodebb"

    and thanks seeing the missing ";"
    not sure why that's missing. The actual doc itself has it.


  • @kevin

    Ok. Did you change it to the ip address i mentioned above?
    You will need to restart nginx for these changes to take effect.


  • 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.


  • @BarveyHirdman

    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.


  • It means that the root directory that I have told you to change does not matter.
    Some misinformation on my side, sorry.

    @kevin The website is working fine for me now.


  • yay BarveyHirdman fixed it!!!

    nginx was still out of date. I thought I updated it to 1.4.4
    It's all better now.


  • @kevin

    Hahaha... 🙂
    I was going to ask if you updated but you said you did so i didn't.

    Glad you got it working.


  • @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.

  • GNU/Linux Admin

    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, the root directive is no longer required and can be safely omitted.


  • @julian No worries, daytime for me is nighttime for you. 😄


  • Damn, I was trying to understand this topic, just miss one f.. ;
    and comment try_files $uri $uri/ /index.html;


  • @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

Suggested Topics

| |