Issue domain name



  • Please tell me how to make what my website did not work http://ip:4567/ a http://forum.mydomainname.ru/

    I have the following settings:
    {
    "url": "http://forum.mydomainname.ru",
    "secret": "censor",
    "database": "mongo",
    "port": 4567,
    "mongo": {
    "host": "127.0.0.1",
    "port": "27017",
    "username": "censor",
    "password": "censor",
    "database": "censor"
    }
    }

    nginx, apache httpd is not installed.
    VPS, Debian GNU/Linux Jessie. Linux 3.6.x
    NodeBB 1.4.2
    Installed only NodeJS, MongoDB

    Please explain how that would make my site work as http://forum.mydomainname.ru/


  • Global Moderator

    @ZerGabriel so you need to set up an A DNS record with your domain provider.

    Then, set up nginx to reverse proxy port 4567 to port 443 for https



  • Thanks @PitaJ I forgot to clarify.
    I use http://www.cloudflare.com as DNS.
    I have recorded a cloudflare DNS record.
    I don't use https, only http.



  • Thank you all for the help, did.

    Debian GNU/Linux Jessie:

    sudo service nginx stop

    Code:

    server {
    listen 80;

    server_name forum.mydomainname.ru;
    
    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";
    }
    

    }

    You need to paste the code in:
    /etc/nginx/sites-enabled/default

    sudo service nginx start


Log in to reply
 


Star

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.