Answer the question
In order to leave comments, you need to log in
How to make an additional ip the main one via ssh?
Good afternoon.
It is necessary to make the domain work on a new IP on the same server.
Ordered an additional IP. Now the domain has 2 ips, primary and secondary. It still works in the main. I didn’t find any material on the net, how to make the site work on a new IP? Found a bunch of articles but for the isp panel. I don't have isp, only ssh. How to be?
Answer the question
In order to leave comments, you need to log in
See how it works
A server can have a million IPs and they may or may not be able to access the site.
it all depends on the configs.
For example, in your config it says * in the ip from which requests are made, then by adding a new ip you will have a site working on it.
if you have explicitly specified ip in apache and nginx configs, then you will need to change them.
Here's an example of what it looks like in real life.
listen :80;
server_name 5job.ru www.5job.ru ;
root /var/www/5job.ru/web;
listen 111.1111.111.11:80;
server_name 5job.ru www.5job.ru ;
root /var/www/5job.ru/web;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question