install on wp site
-
Hi community!
Im not really familiar with all this stuff, so if you guys could help that would be awesome.
Currently there's a wp running on domain.com via an ubuntu droplet on digital ocean, installed via EasyEngine.
I would like to install nodebb on domain.com/forum. How do I do this?Thanks so much.
-
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.
-
Checkout this first: https://nodebb.readthedocs.io/en/latest/installing/os.html or
https://nodebb.readthedocs.io/en/latest/installing/docker.html for dockerIf you get stuck you can ask specific question in this forum
-
@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 dockerIf 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:
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) -
Can you try starting it in developer mode with:
./nodebb dev
and give us the output of the startup.
-
Use stable version of NodeBB.
git checkout v1.x.x
Do not use master for prod!
-
@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?
-
@absurdsmash said in install on wp site:
server_name mydomain.com;
change this line to...
server_name forum.mydomain.com;
-
@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*
-
@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.
-
@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
-
@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
-
@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*
-
Can anyone Help? It still is not set up correctly.
-
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.
-
@Peter-Zoltan-Keresztes Thank you. Allright, here we go:
cd /etc/nginx/sites-enabled
ls
22222 default forum.mydomain.com testnano 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.
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.
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.
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.
-
Can you post your
nginx.conf
too? -
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.
Pastebin (pastebin.com)
Also noticed registration and login is a little slow.
-
Is there anything in the
conf.d
directory?Does your machine have 4 CPU cores?
-
@yariplus Yes, there is:
ls conf.d
blockips.conf fastcgi.conf upstream.conf
nano blockips.conf
http://pastebin.com/nhjzwu4Vnano fastcgi.conf
http://pastebin.com/jjJRhcsinano 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