• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

install on wp site

Scheduled Pinned Locked Moved Technical Support
22 Posts 5 Posters 7.7k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Peter-Zoltan KeresztesP Offline
    Peter-Zoltan KeresztesP Offline
    Peter-Zoltan Keresztes
    wrote on last edited by
    #2

    Install Nodejs, mongodb/redis and everything else what's needed by nodebb to run. Setup the nodebb and then configure the nginx to work as a subdomain. Not really a brainsurgery.

    1 Reply Last reply
    0
  • JenklerJ Offline
    JenklerJ Offline
    Mikael Jenkler Swedes
    wrote on last edited by Jenkler
    #3

    Checkout this first: https://nodebb.readthedocs.io/en/latest/installing/os.html or
    https://nodebb.readthedocs.io/en/latest/installing/docker.html for docker

    If you get stuck you can ask specific question in this forum 🙂

    absurdsmashA 1 Reply Last reply
    1
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to Mikael Jenkler on last edited by absurdsmash
    #4

    @Jenkler said in install on wp site:

    Checkout this first: https://nodebb.readthedocs.io/en/latest/installing/os.html or
    https://nodebb.readthedocs.io/en/latest/installing/docker.html for docker

    If you get stuck you can ask specific question in this forum 🙂

    Followed the instructions till step 9, thanks for the links!
    Could not get it to work however. Followed these steps:

    node app --setup

    domain.com/forum as the URL to access the nodebb
    secret
    mongo as the database to use
    host IP address: 127.0.0.1
    host port of mongo 27017
    username (we added this user in step 6 of the guide)
    password we specified
    nodebb as mongodb database
    Configuration saved. OK.

    No errors.

    ./nodebb start
    Its running.

    ./nodebb log shows the following:

    0_1470684024558_13940061_862183903926622_865037271_o.png

    when visiting domain.com:4567 extra log is shown in the terminal.
    the browser shows:

    TypeError: req.csrfToken is not a function
    at Object.apiController.getConfig (/root/Forum/nodebb/src/controllers/api.js:62:26)
    at async.parallel.config (/root/Forum/nodebb/src/middleware/header.js:26:22)
    at /root/Forum/nodebb/node_modules/async/lib/async.js:718:13
    at async.forEachOf.async.eachOf (/root/Forum/nodebb/node_modules/async/lib/async.js:233:13)
    at _parallel (/root/Forum/nodebb/node_modules/async/lib/async.js:717:9)
    at Object.async.parallel (/root/Forum/nodebb/node_modules/async/lib/async.js:731:9)
    at /root/Forum/nodebb/src/middleware/header.js:24:10
    at Object.csrf [as applyCSRF] (/root/Forum/nodebb/node_modules/csurf/index.js:71:14)
    at Object.middleware.buildHeader (/root/Forum/nodebb/src/middleware/header.js:23:14)
    at Controllers.handleErrors (/root/Forum/nodebb/src/controllers/index.js:452:29)
    at Layer.handle_error (/root/Forum/nodebb/node_modules/express/lib/router/layer.js:71:5)
    at trim_prefix (/root/Forum/nodebb/node_modules/express/lib/router/index.js:310:13)
    at /root/Forum/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/root/Forum/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/root/Forum/nodebb/node_modules/express/lib/router/index.js:271:10)
    at Layer.handle [as handle_request] (/root/Forum/nodebb/node_modules/express/lib/router/layer.js:97:5)
    at trim_prefix (/root/Forum/nodebb/node_modules/express/lib/router/index.js:312:13)
    at /root/Forum/nodebb/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/root/Forum/nodebb/node_modules/express/lib/router/index.js:330:12)
    at next (/root/Forum/nodebb/node_modules/express/lib/router/index.js:271:10)
    at middleware.privateUploads (/root/Forum/nodebb/src/middleware/middleware.js:295:10)
    at Layer.handle [as handle_request] (/root/Forum/nodebb/node_modules/express/lib/router/layer.js:95:5)

    1 Reply Last reply
    0
  • Peter-Zoltan KeresztesP Offline
    Peter-Zoltan KeresztesP Offline
    Peter-Zoltan Keresztes
    wrote on last edited by
    #5

    Can you try starting it in developer mode with:

     ./nodebb dev
    

    and give us the output of the startup.

    1 Reply Last reply
    0
  • JenklerJ Offline
    JenklerJ Offline
    Mikael Jenkler Swedes
    wrote on last edited by
    #6

    Use stable version of NodeBB.

    git checkout v1.x.x

    Do not use master for prod!

    absurdsmashA 1 Reply Last reply
    0
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to Mikael Jenkler on last edited by absurdsmash
    #7

    @Jenkler said in install on wp site:

    Use stable version of NodeBB.

    git checkout v1.x.x

    Do not use master for prod!

    Thank you! That helped. I had a running wp site on mydomain.com, with a nodebb forum on mydomain.com"4567.

    Now trying the configure nginx to proxy forum.mydomain.com to mydomain.com:4567.
    However now I have the forum running on mydomain.com and I cannot figure out how to move it to forum.mydomain.com. I have been playing with the settings, but cannot get it to work properly.

    I followed this guide.

    I now have the following:

    in /etc/nginx/sites-available I have 3 files, 22222, default and mydomain.com, the latter of which contains:

    server {
    listen 80;
    
    server_name mydomain.com;
    
    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:4567/;
        proxy_redirect off;
    
        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
    

    }

    Also did this command

    sudo ln -s /etc/nginx/sites-available/mydomain.com /etc/nginx/sites-enabled/

    and reloaded nginx.

    So my question is, what do I need to change in nginx settings (server_name, proxy addr)? And do I need to change anything in my DNS settings at Digital Ocean? A new A record for forum.mydomain.com to the servers IP?

    pichaliteP 1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    replied to absurdsmash on last edited by
    #8

    @absurdsmash said in install on wp site:

    server_name mydomain.com;

    change this line to...
    server_name forum.mydomain.com;

    absurdsmashA 1 Reply Last reply
    0
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to pichalite on last edited by absurdsmash
    #9

    @pichalite Hi thanks for the quick reply, but unfortunately that does not seem to work.

    forum.mydomain.com now gives me:

    This site can’t be reached
    forum.mydomain.com server DNS address could not be found.

    Also, mydomain.com displays (it previously displayed a wp installation):

    Welcome to nginx!
    If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

    In my digital ocean networking settings I have forum.mydomain.com linked to the IP address of the droplet, just like mydomain.com.

    Edit; my zone file looks like this

     $ORIGIN mydomain.com.
     $TTL 1800
    mydomain.com. IN SOA ns1.digitalocean.com. hostmaster.mydomain.com. 1470850599 10800 3600 604800 1800
    mydomain.com. 1800 IN NS ns1.digitalocean.com.
    mydomain.com. 1800 IN NS ns2.digitalocean.com.
    mydomain.com. 1800 IN NS ns3.digitalocean.com.
    mydomain.com.mydomain.com. 1800 IN A *IP*
    www.mydomain.com. 1800 IN CNAME mydomain.com.
    mydomain.com. 1800 IN A *IP*
    
    Peter-Zoltan KeresztesP 1 Reply Last reply
    0
  • Peter-Zoltan KeresztesP Offline
    Peter-Zoltan KeresztesP Offline
    Peter-Zoltan Keresztes
    replied to absurdsmash on last edited by
    #10

    @absurdsmash said in install on wp site:

    gital ocean networking s

    First of all you don't have any records for forum.mydomain.com that's exactly the DNS error you see in your browser. For using this setting you will have to create a complete new virtualhost configuration.

    Only adding as mydomain.com/forum you would need to add the configuration to the mydomain.com virtualhost settings.

    absurdsmashA 1 Reply Last reply
    0
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to Peter-Zoltan Keresztes on last edited by
    #11

    @Peter-Zoltan-Keresztes said in install on wp site:

    @absurdsmash said in install on wp site:

    gital ocean networking s

    First of all you don't have any records for forum.mydomain.com that's exactly the DNS error you see in your browser. For using this setting you will have to create a complete new virtualhost configuration.

    Only adding as mydomain.com/forum you would need to add the configuration to the mydomain.com virtualhost settings.

    In virtual host settings? You Mean add a new A record in digital ocean with mydomain.com? Sorry I dont really understand what exactly to add or edit

    Peter-Zoltan KeresztesP 1 Reply Last reply
    0
  • Peter-Zoltan KeresztesP Offline
    Peter-Zoltan KeresztesP Offline
    Peter-Zoltan Keresztes
    replied to absurdsmash on last edited by
    #12

    @absurdsmash By virtual host I mean your nginx configuration for a different domain/subdomain.

    Basically you have an A record for mydomain.com but you missing the A record for forum.mydomain.com. Once that is done and is resolving correctly you will need to add another config file to /etc/nginx/conf.d or /etc/nginx/sites-enabled for forum.mydomain.com

    absurdsmashA 1 Reply Last reply
    0
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to Peter-Zoltan Keresztes on last edited by absurdsmash
    #13

    @Peter-Zoltan-Keresztes aaaah!

    forum.mydomain.com now succesfully loads the nodebb forum! Thank you so much!

    However,

    I still have mydomain.com showing Welcome to Gninx, while previously, before I installed nginx, there was a wp-sites displayed (installed via ee). I want that wp-site to be displayed on mydomain.com, and obviously not welcome screen from nginx.
    Also, www.forum.mydomain.com does not work; only forum.mydomain.com. How can I resolve that?

    cd /etc/nginx/sites-available && ls

    22222, default, forum.mydomain.com

    nano forum.mydomain.com

    server {
    
    listen 80;
    
    server_name mydomain.com;
    
    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:4567/;
        proxy_redirect off;
    
        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
    }
    

    This forum.mydomain.com file is exactly the same as in the sites-enabled folder.

    On digital ocean I now have, under Networking, Domains: 1. forum.mydomain.com, 2. mydomain.com

    Zone file forum.mydomain.com record:

    $ORIGIN forum.mydomain.com.
    $TTL 1800
    forum.mydomain.com. IN SOA ns1.digitalocean.com. hostmaster.forum.mydomain.com. 1470862410 10800 3600 604800 1800
    forum.mydomain.com. 1800 IN NS ns1.digitalocean.com.
    forum.mydomain.com. 1800 IN NS ns2.digitalocean.com.
    forum.mydomain.com. 1800 IN NS ns3.digitalocean.com.
    forum.mydomain.com. 1800 IN A *IP droplet*
    forum.mydomain.com.forum.mydomain.com. 1800 IN A *IP droplet*
    www.forum.mydomain.com. 1800 IN CNAME forum.mydomain.com.
    

    Zone file mydomain.com record:

    $ORIGIN mydomain.com.
    $TTL 1800
    mydomain.com. IN SOA ns1.digitalocean.com. hostmaster.mydomain.com. 1470862340 10800 3600 604800 1800
    mydomain.com. 1800 IN NS ns1.digitalocean.com.
    mydomain.com. 1800 IN NS ns2.digitalocean.com.
    mydomain.com. 1800 IN NS ns3.digitalocean.com.
    mydomain.com.mydomain.com. 1800 IN A *IP droplet*
    www.mydomain.com. 1800 IN CNAME mydomain.com.
    mydomain.com. 1800 IN A *IP droplet*
    
    absurdsmashA 1 Reply Last reply
    0
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to absurdsmash on last edited by
    #14

    Can anyone Help? It still is not set up correctly. 😞

    Peter-Zoltan KeresztesP 1 Reply Last reply
    0
  • Peter-Zoltan KeresztesP Offline
    Peter-Zoltan KeresztesP Offline
    Peter-Zoltan Keresztes
    replied to absurdsmash on last edited by
    #15

    @absurdsmash

    First of all change the server_name for forum.mydomain.com to forum.mydomain.com and restart the nginx. Second of all please show the configuration of default and 22222 so that we can find out which is the proper config for mydomain.com.

    absurdsmashA 1 Reply Last reply
    1
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to Peter-Zoltan Keresztes on last edited by absurdsmash
    #16

    @Peter-Zoltan-Keresztes Thank you. Allright, here we go:

    cd /etc/nginx/sites-enabled
    ls
    22222 default forum.mydomain.com test

    nano 22222

    Pastebin.com - Not Found (#404)

    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

    favicon

    Pastebin (pastebin.com)

    nano default

    Pastebin.com - Not Found (#404)

    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

    favicon

    Pastebin (pastebin.com)

    nano forum.mydomain.com

    Pastebin.com - Not Found (#404)

    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

    favicon

    Pastebin (pastebin.com)

    I just dont get how nginx works. Im gonna try and read some more info on nginx.

    Edit: just noticated theres a slight typo on the last paste. it says yserver, i fixed that now.
    And just to be clear, I have my forum running on forum.mydomain.com. However mydomain.com now displays a welcome to nginx message, while previously it was a wp site.

    Edit2: now removed default and now both mydomain.com, as well as forum.mydomain.com go to nodebb forum.

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #17

    Can you post your nginx.conf too?

    absurdsmashA 1 Reply Last reply
    0
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to yariplus on last edited by absurdsmash
    #18

    Hi @yariplus

    Here it is:

    Pastebin.com - Not Found (#404)

    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

    favicon

    Pastebin (pastebin.com)

    Also noticed registration and login is a little slow.

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #19

    Is there anything in the conf.d directory?

    Does your machine have 4 CPU cores?

    absurdsmashA 1 Reply Last reply
    0
  • absurdsmashA Offline
    absurdsmashA Offline
    absurdsmash
    replied to yariplus on last edited by absurdsmash
    #20

    @yariplus Yes, there is:

      ls conf.d
    

    blockips.conf fastcgi.conf upstream.conf

    nano blockips.conf
    http://pastebin.com/nhjzwu4V

    nano fastcgi.conf
    http://pastebin.com/jjJRhcsi

    nano upstream.conf
    http://pastebin.com/z7uViA7r

    --

    I have an ubuntu 16.04 droplet on digital ocean. 512 MB Memory / 20 GB Disk / AMS2 - Ubuntu 16.04.1 x64

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #21

    Well, your worker_connections is way too high, according to the nginx docs, it should be 1024 or less. That might possibly be causing connection issues.

    I can't find anything that might be causing the problem though.

    absurdsmashA 1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development