P
P
Padaboo2015-02-02 07:11:56
Nginx
Padaboo, 2015-02-02 07:11:56

How to set up an NS record for a web server with a specified port?

I have a purchased domain http:// site . ru/ you need to make an entry with the ip address and port.
The fact is that I have a router, behind the router there is a server, on it there are two sites on the nginx web server.
The first site has an A record for the domain indicating the ip address of the router (standard port 80). Then there is a redirect (port forwarding) from the 80th port of the router to the 81st port of the server.
Now I launched the second site, it spins on port 82 and forwarded ports from router port 82 to server port 82. It is necessary to make some kind of entry in the hosting panel so that when entering the domain name, a redirect occurs to the ip address of the router and port 82.
ea16f3b620702dde236af059d83d3996.gif

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey Petrikov, 2015-02-02
@RicoX

This question has already been here 10 times for sure, they ban you in Google, well, they’ve got it, honestly, you can’t specify a port for DNS if there is no support for SRV records in the client, it is not in browsers. This issue is solved only by proxying from port 80, space the sites by name and proxy depending on the name - nginx can do this.

S
Salavat Sharapov, 2015-02-02
@desperadik

Set up Apache on port 80 in proxy mode. And then proxy at least for all 65k ports.

B
boomwest, 2015-02-02
@boomwest

NS has nothing to do with it. All your domains should look at http://router:80.
Put bare Nginx on port 80, and in nginx.conf configure proxying of the desired domain to the desired port.

V
Vlad Zhivotnev, 2015-02-02
@inkvizitor68sl

No way.
You need to look at the mechanism of virtual hosts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question