Answer the question
In order to leave comments, you need to log in
What should be done to redirect all subdomains from a certain level for processing to another server from the main one?
There is a domain and it refers to the server 0.0.0.1 for example
On this server there is such processing of the nodejs application request:
server {
listen 80;
server_name *.domain.com;
location / {
proxy_pass http://localhost:8080; # Это порт на котором запущено node js приложение
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /api {
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question