Answer the question
In order to leave comments, you need to log in
How to raise one of the Django applications on a project subdomain (nginx)?
There are two applications in the project - landing and dashboard.
The landing should be on the example.com domain, and the personal account and everything else on the dashboard.example.com subdomain. Tell me how to configure Nginx in this case?
Answer the question
In order to leave comments, you need to log in
So what's so difficult?
In DNS, you must have 2 domains example.com and dashboard.example.com registered. In your case, they refer to the same IP.
Then in nginx you register 2 virtual servers:
server {
listen 80;
server_name example.com;
root <путь к статическому контенту>/static_content;
}
server {
listen 80;
server_name dashboard.example.com;
root <путь к статическому контенту>/static_content;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question