-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve subdomains for tenants in production with Nginx #327
Comments
Have you got a wildcard in your DNS settings |
Just added it and it has worked. Thanks!! |
@Ngahu No problem 😄 |
@Ngahu I am facing the same problem, what is wildcard you have put on your solution? how did you set it up? Thanks |
On your DNS Management page create a type A record and use * as the Host Name |
I created a wildcard but it seems that it is not calling django to redirect on nginx on ubuntu |
I have the wildcard A DNS with * but when I try to access the subdomain it doesn't display the login page |
I have a project using django-tenants .On localhost , I can access
localhost:8000
andtenant.localhost:8000
pretty fine. However, in production, only the public tenant is loading the other tenants can't be reached. What could be the issue?Here is my ALLOWED_HOSTS =
['.example.com']
and my Nginx conf is as below;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name *.example.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/ubuntu/projects/myproject;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
The text was updated successfully, but these errors were encountered: