A
A
Alexey Yarkov2016-05-26 11:00:37
Network administration
Alexey Yarkov, 2016-05-26 11:00:37

How to transfer websites from hosting to VDS?

Hello. There is a VDS, an application on Node.js + Nginx is running on it in front of it. And there are 2 sites on sweb.ru hosting - one with an SSL certificate, and one just a blog on Wordpress. I want to transfer them to VDS. When installing an SSL certificate for hosting, I had to buy an extra. IP address. And when setting up Nginx on VDS, I came to the conclusion that the add. address is not needed at all.
That is, I will install MySQL + PHP right now, I will write it in the config like this:

http {

  server {
    listen 80;
    server_name domen.ru www.domen.ru;
    return 301 https://$server_name$request_uri;
  }

  server {
    listen       443 ssl;
    server_name  domen.ru www.domen.ru;

  server {
    listen 80;
    server_name domen2.ru www.domen2.ru;
    return 301 https://$server_name$request_uri;
  }

  server {
    listen       443 ssl;
    server_name  domen2.ru www.domen2.ru;

............................

Well, and so on ... And everything will work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2016-05-26
@alsopub

Two different ssl certificates on the same ip?
It would not work before, now modern browsers have SNI.

S
Sanes, 2016-05-26
@Sanes

Will

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question