How do you get to the Nginx configuration

  • Depends on the browser.

    Try ctrl+f5 or shift+f5

    It doesnt work for me on the URL. The numbers do not appear at the bottom of the page.




    You need to change this line:

    root /path/to/nodebb/install;

    In your sites-available to the location of your nodebb install too. Then restart nginx.

  • Oh, yeah i know how to clear the browser cache. I thought you meant some other cache on the website.

    So maybe this'll show what i mean

    This is the ip address
    Screen Shot 2014-01-15 at 1.49.07 AM.png

    This is
    Screen Shot 2014-01-15 at 1.49.22 AM.png

    ip address
    Screen Shot 2014-01-15 at 1.50.06 AM.png
    Screen Shot 2014-01-15 at 1.49.36 AM.png

    if you notice that certain features stop working. In the url it won't show that i'm logged in. It wont show the forum stats. It wont show if someone is online or offline.

  • @BarveyHirdman
    huh.... now i'm confused. It's still doing it across all browsers after clearing everything, logging out, logging back in. No changes. Your fonts look different too.

  • @Scuzz

    okay so i should change

    root /path/to/nodebb/install;


    root /root/mynodebb/install/; ??

  • @kevin I have to wait a couple of seconds until falls back to XHR polling instead of using websockets, since I can't connect to websockets from my workplace. Does waiting 9-10 seconds help?

  • @barveyhirdman
    Im not getting that :S, this is weird.

    Try setting the server to;

    See my root? That is the location of the NodeBB install. But that doesnt seem to matter like i thought it did as mine is in a different location and still works.

    upstream nodebb {
    server {
    listen 80;
    root /var/www/;
    location / {
        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://nodebb/;
        proxy_redirect off;
        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        # pass the PHP scripts to FastCGI server listening on
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
                # With php5-cgi alone:
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;

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

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

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


    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.


    upstream nodebb {


    upstream nodebb {

    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": "",
            "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

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

Suggested Topics

| |