How do you get to the Nginx configuration





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

    to

    root /root/mynodebb/install/; ??



  • @kevin I have to wait a couple of seconds until socket.io 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

    127.0.0.1:4567;
    

    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 127.0.0.1:4567;
    }
    
    server {
    listen 80;
    
    server_name www.bitbangers.co.uk bitbangers.co.uk;
    root /var/www/bitbangers.co.uk/NodeBB;
    
    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 127.0.0.1:9000
        #
        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:
                #fastcgi_pass 127.0.0.1:9000;
                # 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 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.


Log in to reply
 

Suggested Topics

| |