H
H
hime22015-08-18 13:50:43
Network administration
hime2, 2015-08-18 13:50:43

By renting a vps/vps, can I host only ONE website?

I want to rent a vps/vps and host 2 sites on it, is that possible?
It seems to me that there is a catch with ip, it is for this that it is proposed to buy another one.
Apparently for such tasks?
Sorry if the question seems stupid to you, there's always a first time for everything.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
evnuh, 2015-08-18
@hime2

You buy a virtual server - a smaller copy of a real server, that is, a small computer. With it, you can do whatever you want. Even host 100,500 sites. And for this, 1 ip is enough. In dns to all domains that you want to host on your vps, you write the ip of your vps, and in vps you already set up virtual hosts on your web server.
How will vps understand which site to show?
When you type in a website address into the browser, it asks dns ip for the address of the machine corresponding to the given domain and connects to the machine and the installed web server on it via HTTP protocol, while sending headers. In one of the headers (Host:), the browser sends the address of the site that it wants to receive in response, the web server looks at this header, checks with its config and gives, roughly speaking, the entire contents of the folder that corresponds to this host in the config. This practice is called "virtual hosts", virtual hosts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question