-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
I have a question about supporting multiple domains with multiple databases. #385
Comments
Hello,
A. B.
If it isn't possible to match database names from the host/domain name, you can use the module |
Thank you so much for your talking the time to respond to my question. Your answer was incredibly helpful and I really appreciate it. |
@nj-dream Happy to solve this issue. In your case, what exactly was the precise cause of your issue? Which solution did you use? |
I have installed an Odoo16 instance using your script. The domain name is a.mydomain.com and the database is 'a'. Now I want to add another domain name, b.mydomain.com, with a separate database 'b'. I would like to use different subdomains to access different Odoo instances with different databases.
My server environment is Ubuntu 22.04 with SSL enabled. I first copied the nginx configuration file for a.mydomain.com and replaced all instances of a.mydomain.com with b.mydomain.com in the new configuration file. Then I ran 'sudo ln -s /etc/nginx/sites-available/b.mydomain.com /etc/nginx/sites-enabled/b.mydomain.com' and used 'sudo certbot --nginx -d b.mydomain.com --noninteractive --agree-tos --email [email protected] --redirect' to create an SSL certificate.
I then used Odoo's database management function to create a new database named 'b'. Next, I modified the 'odoo.conf' configuration file by adding 'dbfilter = ^%d$'. Finally, I restarted Odoo and nginx.
When I visit a.mydomain.com, I see the Odoo login page for the 'b' database,
and when I visit b.mydomain.com, I see the Odoo database selection page.
What did I do wrong and how can I access the correct Odoo database based on the subdomain name? Thank you!"
The text was updated successfully, but these errors were encountered: