How do you get to the Nginx configuration


  • @Scuzz, How do i do that?


  • Registered an account on your site and logged in fine. Not sure what can cause the issue for you but it might be client-side.


  • @BarveyHirdman did you do it with the ip address or the URL?



  • Depends on the browser.

    Try ctrl+f5 or shift+f5

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

    @kevin

    Firefox

    Chrome

    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 californiamotorcycleforum.com
    Screen Shot 2014-01-15 at 1.49.22 AM.png

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

    californiamotorcycleforum.com
    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;

    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.

Suggested Topics

| |