• Plugin & Theme Dev

    The link step by step:
    log into digitalocean; go to networking -> domains -> magnifier button ("view") of your domain

    If you don't have any listing of your domain there yet, you probably have set-up the DNS record at godaddy directly. In that case you need to add an entry like

    forum.example.com. 1800 IN CNAME example.com.
    

    over there.


  • @hnahli said in Forum on a Sub-domain:

    My domain registered with Godaddy and digitalocean

    Explain a bit more. Godaddy is your registration provider. Are they also your DNS provider? Ie., are they doing the DNS resolution or do you have Godaddy pointed to Digital Ocean's nameservers and Digital Ocean is doing the DNS resolution?


  • @rod Godaddy are handling everything registration and DNS records


  • @hnahli Ok. So now as frissdiegurke mentioned you need to tell Godaddy's DNS system that you want to add a CNAME record entry pointing your forum.example.com to your example.com. Don't miss the tailing period as frissdiegurke displayed.

    In your Nodebb config.json you need to change your URL to be forum.example.com

    Also be sure your webserver configuration has a reverse proxy entry for forum.example.com to get to your NodeBB/Node.js instance. Possibly 127.0.0.1:4567


  • @rod said in Forum on a Sub-domain:

    Also be sure your webserver configuration has a reverse proxy entry for forum.example.com to get to your NodeBB/Node.js instance. Possibly 127.0.0.1:4567

    in Digitalocean or Godaddy? I am kind of lost 😞


  • @hnahli The webserver configuration will be on your Digital Ocean server. Are you using Nginx as the webserver or Apache or some other?


  • @rod I am using Nginx


  • @hnahli

    Adding a server block similar to this should work:

    server {
        listen       80;
        server_name  forum.example.com;
    
        root   /var/www/forum.example.com/html;
        index  index.html index.htm;
    
        access_log  /var/log/nginx/access.forum.example.com.log;
        error_log /var/log/nginx/error.forum.example.com.log;
    
        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://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";
        }
    }
    

  • @rod I have done all the steps and attempting to start Nodebb I got this error:

    19/4 12:46 [21016] - error: Error: listen EADDRINUSE :::4567
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at Server._listen2 (net.js🔢14)
    at listen (net.js:1270:10)
    at Server.listen (net.js:1366:5)
    at listen (/var/www/nodebb/forums/src/webserver.js:179:17)
    at /var/www/nodebb/forums/src/webserver.js:57:3
    at EventEmitter.<anonymous> (/var/www/nodebb/forums/src/emitter.js:17:5)
    at emitNone (events.js:67:13)
    at EventEmitter.emit (events.js:166:7)
    19/4 12:46 [21016] - error: NodeBB address in use, exiting...


  • @hnahli Maybe you still have NodeBB running. What is the output of this from your command line:

    ps fax | grep node


  • @rod @frissdiegurke this guide worked like a charm and it didnt fail from first command line.

    My problem now is that the main domain is on SSL and sub-domain where the nodebb is not and after mailjet integration it is sending confirmation using https

    Please advise

Suggested Topics

| |