Problems with subdomains
-
Ok, let me start off with saying that I am a complete newbie to NodeBB and Nginx, so work with me here xD
Problem: Cannot find out how to redirect the default NodeBB ip (http://localhost:4567) to my domain with GoDaddy
What is needed: Precise instructions on how to have people connect to the forums by typing in forums.sentnet.us.
Edit: Added Files
/etc/nginx/conf.d - Folder Empty
/etc/ngin/sites-available - Contains a file named 'default'
/etc/nginx/sites-enabled - Contains 2 files named 'default' and 'nodebb.conf'
/etc/nginx/nginx.conf - http://pastebin.com/tbmR6j0g
/home/aphex/NodeBB/config.json - http://pastebin.com/pwlnt2hhIf you need any more information, feel free to ask,
-Aphex -
Your config.json in NodeBB folder should be like that:
"url": "http://forums.sentnet.us"
Nginx config:
server { listen 80; server_name forums.sentnet.us; 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; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
-
I added what my Nginx.conf looks like in the original post, and ummm... I can't find what you put in my config.
Thank you for the quick response.
-
Change
"url":"http://localhost:4567",
value in /home/aphex/NodeBB/config.json to"url":"forums.sentnet.us",
Delete default and nodebb.conf nginx configs, create a new file in sites-available called as anything then paste the config I gave above, then,
sudo ln -s /etc/nginx/sites-available/yourconfigname /etc/nginx/sites-enabled/
sudo service nginx restart
-
Ok, I have done what you have said... But now there is another problem.
I have setup an A record pointing to my IP, like what several tutorials for this have said, but now it just redirects me to my regular homepage. I type in forums.sentnet.us and the same webpage for sentnet.us appears.
Thanks,
- Aphex
-
Sorry for all these questions, but do you know what to put for adding a CNAME record? I tried doing it and it still resulted in sending me to the default homepage