Answer the question
In order to leave comments, you need to log in
How to bind an IP address to a domain?
Hello. Bought a dedicated IP address for my domain. There is a small VPS that runs Nginx (proxy) + Apache. Now there is a task to bind this IP address to the domain.
Do I understand the sequence of actions correctly:
1) A-records pointing to the IP address of the VPS are deleted in the DNS zone of the domain
2) A-records are added to the DNS zone pointing to the purchased IP address
3) Listen 1.2.3.4:80 is written in the Nginx configuration ;
4) Restart Bind, Nginx, Apache
(Apache listens on 127.0.0.1:81)
Answer the question
In order to leave comments, you need to log in
Oh, and they advised you, the domain is in listen ...
It should be like this (conditionally you have ip = 1.1.1.1)
listen 1.1.1.1:80;
server_name domain.com www.domain.com;
listen 80;
server_name domain.com www.domain.com;
listen 80;
listen 443 ssl;
server_name domain.com www.domain.com;
location / {
proxy_pass http://127.0.0.1:81;
}
IP must be assigned to the controlled network interface to which nginx is docked and all that,
then change the A record (or add it, it will open two by two)
The Nginx configuration specifies listen 1.2.3.4:80;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question