V
V
Vitaly Nevzorov2015-03-15 21:19:28
linux
Vitaly Nevzorov, 2015-03-15 21:19:28

Own hostname for each ip?

Hello dear community.
There is a CentOS server with four IP addresses on board.
Can you tell me if it is possible to assign a different hostname to each IP?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
OnYourLips, 2015-03-15
@OnYourLips

DNS.

S
Saboteur, 2015-03-16
@saboteur_kiev

whatever you want.
by any of the hostnames, it will refer to the same machine. Most services will respond regardless of which interface the request came from (the firewall can tweak the truth).
For a web server, virtual directories can be configured to different domain names, even if they lead to the same IP.
You specify what service you need to organize

J
jidckii, 2015-03-15
@jidckii

I haven't tried it myself, but I think it's possible, it's done in /etc/hosts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question