Issues with Nginx and Domain
-
Hey there. I sucefully installed NodeBB following this: DOCS
I already edited the path/etc/nginx/conf.d/nodebb.conf
But now I run the commandsudo systemctl status nginx.service
And this is what I see in the terminal
Also
Nodebb.conf loos like this:
server { listen [::]:443 ssl http2; listen 443 ssl http2; listen [::]:80; listen 80; mydomain.me; client_max_body_size 50M; # RSA ssl_certificate /etc/letsencrypt/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/example.com/private.key; # ECDSA ssl_certificate /etc/letsencrypt/example.com_ecc/fullchain.pem; ssl_certificate_key /etc/letsencrypt/example.com_ecc/private.key; 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 added DNS Record with my server IP but It doesn't work. The IP is not referring users to domain. I don't know if i did something wrong with the Nginx. Note before editing nodebb.conf the command
sudo systemctl status nginx.service
didn't had any error. -
-
Can you ping the domain to make sure it refers to your IP address?
What is your nginx config now?
-
What happens when you visit your domain?
-
@Per0x @PitaJ Domain is empty, already bough it and it says "This site is under development". And yes everything worked with localhost:4567
(Now it doesn't work, since I edited nginx configuration, also setup my domain "sampfive.me* in config.json -
@Dan-Reyes can you take a screenshot of the browser when you visit your domain?
-
@Dan-Reyes I would create a sub-domain like forum.sampfive.me
nginx.conf
server_name forum.sampfive.me;
New DNS record, and new SSL certificate.
-
@Per0x How is that possible? I don't have anything as "forum.sampfive.me"
Btw i have 300seconds cooldown.Oh, forum.sampfive.me looks like when i try myip:4567 (this happened after editing nginx)
-
@Per0x When I installed nodebb I used default setting, localhost:4567 etc etc. Cuz I know its possible to change or migrate to a custom domain. And what do you mean about sites-enabled thingy? In the docs there is only one step and it is about sites-available.
Should i try uninstalling nginx and follow any other steps? Like i followed this https://docs.nodebb.org/installing/os/ubuntu/#configuring-nginx and this https://www.howtoforge.com/how-to-install-nodebb-forum-on-ubuntu-1804-lts/ but none of these seems to be working for me, ir maybe I did something wrong i really don't know.
-
@Dan-Reyes said in Issues with Nginx and Domain:
what do you mean about sites-enabled thingy?
my mistake I meant sites-available.
Anyway, when you install nodebb, you have to set your domain name as url (you can change it in config.json).
And you have to make sure your reverse proxy (nginx) is not in conflict with others redirections as it seems. -
I recommend getting nginx and nodebb working with just your IP address.
server_name 1.2.3.4;
then when that working you switch it to use the domain. -
@PitaJ It was working with my IP. I had the warning box "looks like you lost connection to nodebb etc etc.." and I saw how to fix it and one method is by using your domain. Then i did everything in the docs, It didn't worked then i tried howtoforge method and still. After that forum stopped working on IP and you already saw what happend when i try to use the domain. Note that I completely uninstalled NGINX before switching from docs method to howtoforge