A
A
Anton Misyagin2019-02-19 10:05:44
Nginx
Anton Misyagin, 2019-02-19 10:05:44

How to host two or more websites on a server?

Good afternoon, there is a server on which the rail application was running. Nginx is used as a web server and listens on ports 80 and 443. The whole economy is stuffed into containers. Now I have written a blog on WordPress and I want to host it on the same server. I downloaded the official images, raised the containers. Apache is there. SSL will not be used on the blog. Please tell me how to set up the system. I am providing a block diagram. I do not understand, for example the following things. Do I need two webservers and apache and nginx. Apache is immediately built into the official docker image and works out of the box. Nginx set up for a long time, there is ssl. It jars me that I have to edit the nginx configs in STACK1 indicating that there is STACK2 - this is somehow not kosher, all of a sudden I will have to spread these sites to different servers in the future. I want that in the settings of site1 and its web server only site1 is mentioned and site2 is not touched. Or will it not work? Or maybe another one is placed behind these web servers, which decides where to go to the request to nginx or apache. Has anyone done something similar and what is the best way to do it?
5c6baac090550001363388.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
yayashitoya, 2019-02-19
@yayashitoya

You just make an input http server (so-called reverse proxy).
There also razrulivayte on domains.
Behind it, the http-server standing (on other ports, of course) will not know anything about each other.

A
Artem, 2019-02-19
@ulkoart

run nginx directly on the server and let it drive.

P
Puma Thailand, 2019-02-19
@opium

ssl to traefik and let it destroy the traffic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question