L
L
l4m3r2019-03-19 17:27:56
Web development
l4m3r, 2019-03-19 17:27:56

How to raise multiple sites on one server?

The company has 3 small little-visited sites. Now they are on different regular hostings due to historical reasons. For the sake of economy and education, the idea arose to buy one kvm VPS, install docker there, dockerize (using docker-compose) each site and run them on this VPS. I have never worked with the docker in the prod on this issue:
1) Conflicts. It turns out that each site runs its own nginx, php-fpm, mysql container on the same ports. There will be a mistake, of course. Do I need to do either a common docker-compose for all 3 projects or put 1 more nginx ahead of all this in order to proxy requests? Or how? Or abandon docker altogether. I do not understand.
2) Several sites on the same IP that resolve by serverName - is this a normal approach? Are there pitfalls?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2019-03-19
@l4m3r

Several sites on the same IP that resolve by serverName - is this a normal approach?
How do you think shared hosting works, which have several hundred domains/sites on one IP?
docker is needed where it is needed and when it is needed. but they didn’t catch the hype, they demolished the cuckoo, we spit it for every sneeze-puff.
according to your description, you don’t even need a VPS - just transfer all sites to one account with one host.
and for training, a localhost or a personal VPS is great.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question