Skip to content

Issues with 2nd NodeBB installation

Solved General
22 2 9.5k 1
  • @MadWay NodeBB is in fact based on NodeJS so doesn’t use PHP at all.

    wrote on last edited by
    #1

    @phenomlab there is some problem with my second installation of NodeBB the same machine. NodeBB installed
    Db created
    SSL done
    All confings are done
    But website not opening the problem is ERR_TOO_MANY_REDIRECTS

  • @phenomlab there is some problem with my second installation of NodeBB the same machine. NodeBB installed
    Db created
    SSL done
    All confings are done
    But website not opening the problem is ERR_TOO_MANY_REDIRECTS

    wrote on last edited by
    #2

    @cagatay Can you provide more detail as to the steps you took to install the second instance of NodeBB - for example

    1. Directory location
    2. NGINX config

    etc…

    Thanks

  • phenomlab phenomlab marked this topic as a question on
  • @cagatay Can you provide more detail as to the steps you took to install the second instance of NodeBB - for example

    1. Directory location
    2. NGINX config

    etc…

    Thanks

    wrote on last edited by
    #3

    @phenomlab
    Added new user as nojor
    NodeBB installed this path
    Mangodb created db and user
    NodeBB confing.js fixed
    sites-avalieble added as below
    What i should do more?

    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    	
    	
    	ssl_certificate /etc/ssl/nojorcert.pem;
        ssl_certificate_key /etc/ssl/nojorkey.pem;
    	ssl_client_certificate /etc/ssl/cloudflare.crt;
    	
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    	
        server_name www.uzayyolu.org;
    
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
    
            proxy_pass http://127.0.0.1:4418;
            proxy_redirect off;
    
            # Socket.IO Support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    	
    
        real_ip_header CF-Connecting-IP;
    	set_real_ip_from 103.21.244.0/22;
    	set_real_ip_from 103.22.200.0/22;
    	set_real_ip_from 103.31.4.0/22;
    	set_real_ip_from 104.16.0.0/12;
    	set_real_ip_from 108.162.192.0/18;
    	set_real_ip_from 131.0.72.0/22;
    	set_real_ip_from 141.101.64.0/18;
    	set_real_ip_from 162.158.0.0/15;
    	set_real_ip_from 172.64.0.0/13;
    	set_real_ip_from 173.245.48.0/20;
    	set_real_ip_from 188.114.96.0/20;
    	set_real_ip_from 190.93.240.0/20;
    	set_real_ip_from 197.234.240.0/22;
    	set_real_ip_from 198.41.128.0/17;
    	set_real_ip_from 2400:cb00::/32;
    	set_real_ip_from 2606:4700::/32;
    	set_real_ip_from 2803:f800::/32;
    	set_real_ip_from 2405:b500::/32;
    	set_real_ip_from 2405:8100::/32;
    	set_real_ip_from 2c0f:f248::/32;
    	set_real_ip_from 2a06:98c0::/29;
    	
    	add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";
    }
    
    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    	
    	
    	ssl_certificate /etc/ssl/nojorcert.pem;
        ssl_certificate_key /etc/ssl/nojorkey.pem;
    	ssl_client_certificate /etc/ssl/cloudflare.crt;
    	
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    	
        server_name uzayyolu.org;
    	return 301 https://www.uzayyolu.org$request_uri;
    }
    
    server {
        listen 80;
        listen [::]:80;
    	
    	server_name uzayyolu.org www.uzayyolu.org;
    	return 301 https://www.uzayyolu.org$request_uri;
    }
    
    
    
  • @phenomlab
    Added new user as nojor
    NodeBB installed this path
    Mangodb created db and user
    NodeBB confing.js fixed
    sites-avalieble added as below
    What i should do more?

    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    	
    	
    	ssl_certificate /etc/ssl/nojorcert.pem;
        ssl_certificate_key /etc/ssl/nojorkey.pem;
    	ssl_client_certificate /etc/ssl/cloudflare.crt;
    	
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    	
        server_name www.uzayyolu.org;
    
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
    
            proxy_pass http://127.0.0.1:4418;
            proxy_redirect off;
    
            # Socket.IO Support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    	
    
        real_ip_header CF-Connecting-IP;
    	set_real_ip_from 103.21.244.0/22;
    	set_real_ip_from 103.22.200.0/22;
    	set_real_ip_from 103.31.4.0/22;
    	set_real_ip_from 104.16.0.0/12;
    	set_real_ip_from 108.162.192.0/18;
    	set_real_ip_from 131.0.72.0/22;
    	set_real_ip_from 141.101.64.0/18;
    	set_real_ip_from 162.158.0.0/15;
    	set_real_ip_from 172.64.0.0/13;
    	set_real_ip_from 173.245.48.0/20;
    	set_real_ip_from 188.114.96.0/20;
    	set_real_ip_from 190.93.240.0/20;
    	set_real_ip_from 197.234.240.0/22;
    	set_real_ip_from 198.41.128.0/17;
    	set_real_ip_from 2400:cb00::/32;
    	set_real_ip_from 2606:4700::/32;
    	set_real_ip_from 2803:f800::/32;
    	set_real_ip_from 2405:b500::/32;
    	set_real_ip_from 2405:8100::/32;
    	set_real_ip_from 2c0f:f248::/32;
    	set_real_ip_from 2a06:98c0::/29;
    	
    	add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";
    }
    
    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    	
    	
    	ssl_certificate /etc/ssl/nojorcert.pem;
        ssl_certificate_key /etc/ssl/nojorkey.pem;
    	ssl_client_certificate /etc/ssl/cloudflare.crt;
    	
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    	
        server_name uzayyolu.org;
    	return 301 https://www.uzayyolu.org$request_uri;
    }
    
    server {
        listen 80;
        listen [::]:80;
    	
    	server_name uzayyolu.org www.uzayyolu.org;
    	return 301 https://www.uzayyolu.org$request_uri;
    }
    
    
    
    wrote on last edited by
    #4

    @cagatay The redirect loop is being caused by this (which I have commented out)

    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    	
    	
    	ssl_certificate /etc/ssl/nojorcert.pem;
        ssl_certificate_key /etc/ssl/nojorkey.pem;
    	ssl_client_certificate /etc/ssl/cloudflare.crt;
    	
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    	
        server_name uzayyolu.org;
    	return 301 https://www.uzayyolu.org$request_uri;
    }
    
    server {
        listen 80;
        listen [::]:80;
    	
    	server_name uzayyolu.org www.uzayyolu.org;
    	return 301 https://www.uzayyolu.org$request_uri;
    }
    
  • @cagatay The redirect loop is being caused by this (which I have commented out)

    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    	
    	
    	ssl_certificate /etc/ssl/nojorcert.pem;
        ssl_certificate_key /etc/ssl/nojorkey.pem;
    	ssl_client_certificate /etc/ssl/cloudflare.crt;
    	
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    	
        server_name uzayyolu.org;
    	return 301 https://www.uzayyolu.org$request_uri;
    }
    
    server {
        listen 80;
        listen [::]:80;
    	
    	server_name uzayyolu.org www.uzayyolu.org;
    	return 301 https://www.uzayyolu.org$request_uri;
    }
    
    wrote on last edited by cagatay
    #5

    @phenomlab so if i add this codes will be work normally? by the way this is same conf like in efelsefe. it works but uzayyolu not interesting.

  • @phenomlab so if i add this codes will be work normally? by the way this is same conf like in efelsefe. it works but uzayyolu not interesting.

    wrote on last edited by phenomlab
    #6

    @cagatay If you compare the nginx.conf between the two sites, they aren’t the same - you are missing the final block on the newer site which is causing the loop. I’ve changed your NodeBB listening port also in both config.json and nojor.conf as the proxy_path doesn’t seem to work and currently just serves the default nginx page.

    Checking this now.

  • @cagatay If you compare the nginx.conf between the two sites, they aren’t the same - you are missing the final block on the newer site which is causing the loop. I’ve changed your NodeBB listening port also in both config.json and nojor.conf as the proxy_path doesn’t seem to work and currently just serves the default nginx page.

    Checking this now.

    wrote on last edited by
    #7

    @phenomlab now there is problem with ./nodebb start as below;

    Starting NodeBB
      "./nodebb stop" to stop the NodeBB server
      "./nodebb log" to view server output
      "./nodebb help" for more commands
    
    Error: kill EPERM
        at process.kill (internal/process/per_thread.js:210:13)
        at /home/nojor/nodebb/loader.js:215:14
        at /home/nojor/nodebb/node_modules/graceful-fs/graceful-fs.js:362:16
        at FSReqCallback.oncomplete (fs.js:180:23)
    /home/nojor/nodebb/loader.js:228
                                            throw err;
                                            ^
    
    Error: kill EPERM
        at process.kill (internal/process/per_thread.js:210:13)
        at /home/nojor/nodebb/loader.js:215:14
        at /home/nojor/nodebb/node_modules/graceful-fs/graceful-fs.js:362:16
        at FSReqCallback.oncomplete (fs.js:180:23) {
      errno: -1,
      code: 'EPERM',
      syscall: 'kill'
    }
    
    
  • @phenomlab now there is problem with ./nodebb start as below;

    Starting NodeBB
      "./nodebb stop" to stop the NodeBB server
      "./nodebb log" to view server output
      "./nodebb help" for more commands
    
    Error: kill EPERM
        at process.kill (internal/process/per_thread.js:210:13)
        at /home/nojor/nodebb/loader.js:215:14
        at /home/nojor/nodebb/node_modules/graceful-fs/graceful-fs.js:362:16
        at FSReqCallback.oncomplete (fs.js:180:23)
    /home/nojor/nodebb/loader.js:228
                                            throw err;
                                            ^
    
    Error: kill EPERM
        at process.kill (internal/process/per_thread.js:210:13)
        at /home/nojor/nodebb/loader.js:215:14
        at /home/nojor/nodebb/node_modules/graceful-fs/graceful-fs.js:362:16
        at FSReqCallback.oncomplete (fs.js:180:23) {
      errno: -1,
      code: 'EPERM',
      syscall: 'kill'
    }
    
    
    wrote on last edited by
    #8

    @cagatay I already started it 🙂

  • @cagatay I already started it 🙂

    wrote on last edited by
    #9

    @phenomlab then why i do not see forum at web site? just opening nginx welcome page

  • @phenomlab then why i do not see forum at web site? just opening nginx welcome page

    wrote on last edited by
    #10

    @cagatay It’s a configuration issue which I am looking at now. You’ll see the instance running if you go to http://<ipaddress>:4568

  • @cagatay It’s a configuration issue which I am looking at now. You’ll see the instance running if you go to http://<ipaddress>:4568

    wrote on last edited by cagatay
    #11

    @phenomlab oh i see. thank you Mark. Thank you so much.

    i think the most important point that second nodebb installed other domain name which nojor.com. so we are trying to change name of it also to uzayyolu.org.

    maybe its also caused the problem @phenomlab
    i think clearly way that re-install all for uzayyolu.org?

  • @phenomlab oh i see. thank you Mark. Thank you so much.

    i think the most important point that second nodebb installed other domain name which nojor.com. so we are trying to change name of it also to uzayyolu.org.

    maybe its also caused the problem @phenomlab
    i think clearly way that re-install all for uzayyolu.org?

    wrote on last edited by phenomlab
    #12

    @cagatay No, I don’t think so. I think this is related to SSL enryption. In Cloudflare, can you set the SSL encryption for this domain to full ?

  • @cagatay No, I don’t think so. I think this is related to SSL enryption. In Cloudflare, can you set the SSL encryption for this domain to full ?

    wrote on last edited by cagatay
    #13

    @phenomlab now yes; was flexable 😞

    99a171fb-10bb-44a3-91d2-8db8e68fdf52-image.png

  • @phenomlab now yes; was flexable 😞

    99a171fb-10bb-44a3-91d2-8db8e68fdf52-image.png

    wrote on last edited by
    #14

    @cagatay Thought so.

    9fee9491-b960-4c29-8688-de5cbd2e8a41-image.png

    Now we have to deal with the invalid cert

  • @cagatay Thought so.

    9fee9491-b960-4c29-8688-de5cbd2e8a41-image.png

    Now we have to deal with the invalid cert

    wrote on last edited by
    #15

    @phenomlab sorry for small detail 😞

  • @phenomlab sorry for small detail 😞

    wrote on last edited by
    #16

    @cagatay No problem - can you set it to full and not Full (Strict)

  • @cagatay No problem - can you set it to full and not Full (Strict)

    wrote on last edited by
    #17

    @phenomlab setted

  • wrote on last edited by
    #18

    @cagatay Working now 🙂

  • @cagatay Working now 🙂

    wrote on last edited by
    #19

    @phenomlab yes i see but i delete all of forums and post how can i do it?

  • cagatay cagatay has marked this topic as solved on
  • @phenomlab yes i see but i delete all of forums and post how can i do it?

    wrote on last edited by
    #20

    @cagatay You’d need to delete these manually or reinstall with a blank database.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Nodebb vs Wordpress vs Other

    General wordpress nodebb woocomerce business
    4
    5 Votes
    4 Posts
    2k Views
    DownPW
    PrestaShop + modules IA https://www.prestashop.com Magento https://developer.adobe.com/open/magento
  • Is my Mongodb installation correct?

    Solved General mongodb
    27
    4
    13 Votes
    27 Posts
    13k Views
    ahmed
    [image: yuuuuu.png]
  • nodebb-plugin-reactions not working @v1.0.2 with Harmony theme

    Solved General reactions v3-prod
    47
    12 Votes
    47 Posts
    16k Views
    phenomlab
    @dave1904 just coming back to this thread as @DownPW and I both experienced issues with other plugins today, and the fix was to use the plugin ordering in the ACP and move the Harmony theme to the very top so it comes before everything else in terms of other plugins. It might be worth at least trying this to see if it gives you a result rather than the previous bulldozer approach. Thinking about it, the previous fix I proposed is along the same lines and disabling plugins does in fact change the order when they are enabled again, so this is definitely worth a try. Let me know how you get on.
  • Nodebb as blogging platform

    General blog
    10
    5 Votes
    10 Posts
    6k Views
    phenomlab
    @qwinter I’ve extensive experience with Ghost, so let me know if you need any help.
  • 0 Votes
    5 Posts
    2k Views
    phenomlab
    @qwinter this particular site uses the code I wrote if you want to see it in action. It’s a information and intelligence gatherer I designed for collecting various information security articles from around the globe and consolidating them in one place. Essentially, each “post” is in fact generated by the script, and the NodeBB API. https://hostrisk.com/
  • Discord Login - OAuth2 - NodeBB

    Solved General discord nodebb plugins
    32
    11 Votes
    32 Posts
    14k Views
    phenomlab
    @Galaxian hi, and welcome to Sudonix Can you check your config.json file and ensure that your forum URL doesn’t have a trailing backslash or forward slash in it ? This was the issue @Sampo2910 had.
  • NodeBB Blog Comments

    General nodebb blog
    3
    1 Votes
    3 Posts
    2k Views
    phenomlab
    @kurulumu-net Not specifically, but you should review this post from the very large thread as it will save you a lot of time. There’s significant customisation on the Ghost side of things, but not in NodeBB https://community.nodebb.org/post/86022
  • Nodebb best plugins

    General nodebb plugins
    18
    7 Votes
    18 Posts
    7k Views
    crazycells
    @phenomlab thanks