L
L
Lancelot2021-10-19 10:00:52
Node.js
Lancelot, 2021-10-19 10:00:52

Link a domain name?

Hello. Please tell me, there is a clean node, without apache and nginx, it spins on port 3000, but how to tie up a domain name? And then it googles that there should be only port 80 or 443. I just have several services on the server and it will not work for everyone to give port 80. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-10-19
@b360124

And then it googles that there should be only port 80 or 443.

If you want the user not to have to write the port - yes, you need to use port 80 and 443.
It's just that I have several services on a server and it won't work to give everyone port 80.

Issue 80 and 443 ports to any one service, which will redirect requests to other services based on the Host header.
Usually, nginx acts as such a service.

K
kosuha, 2021-10-19
@kosuha

Install nginx and configure virtualhost in it to redirect to localhost:3000.
this is how you connect the domain name and your application on Nodejs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question