A
A
account-42017-03-14 00:21:08
Nginx
account-4, 2017-03-14 00:21:08

Why does nginx open a page by subdomain?

On what basis does nginx open content from example.com on the old.example.com subdomain?

server {

        listen 80 default_server;
        listen [::]:80 default_server;
        server_name example.com;
        return 301 https://$server_name$request_uri;

}

server {

        listen 443 ssl http2 default_server;
        listen [::]:443 ssl http2 default_server;
        include snippets/ssl-example.com.conf;
        include snippets/ssl-params.conf;

        location / {
                proxy_pass http://localhost:3000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
        }

        location /.well-known {
                root /home/ubuntu/again/222/static;
        }
}

I want to use old.example.com to open a completely different site with content. How to set it up?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2017-03-14
@account-4

well, at least specify it in the config , old.example.com this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question