OdooTech notes

Testing Odoo 11 on port 80 with multi website on windows server

Odoo give its best with Linux and usually i use that on production environments.

But i was just curious to try the latest Odoo 11 version and try to apply few tricks i get from this two articles:




Here is how to change Odoo 11 port on 80 with multi website on windows server(as explained in the post):

  1. Install Odoo as you normally would.
  2. Using iptables (“iptables -t nat -A PREROUTING -p tcp –dport 80 -j REDIRECT –to-port 8069”) point 8069 to 80 (if you are using UFW – make sure to open both ports! – “ufw allow 8069”, and add the iptables line to /etc/rc.local to make it stick around after a reboot)
  3. Create the databases for your domains, but the database name *has* to take the form of “<domainname>_<TLD>”, for example “yourdomain.com” should have a database named “yourdomain_com” with an underscore between the domain name and TLD.  If you try to use a dash instead of an underline, Odoo says it is not an allowed character, which must have been a change with v10 because everywhere else said use a dash.
  4. Then edit “/etc/odoo/odoo.conf” and add “dbfilter = %h” (I did it before the addons_path, but I don’t think it matters)  There is endless documentation for using “%d” for subdomains, but very little for domains.
  5. Restart Odoo (“service odoo restart”)
  6. Point your domain A records at Odoo and each site will then pick up it’s respective database.

Finally, after taking the last nightly build from:


And installed it on windows server on an AWS instance (remember to set the window firewall and security group).

I’ve tried to change to the default ports and set dbfilter as explained in the articles.

It works!

Consider db and attached site is matched exactly so mydomain.com have to match with db mydomain_com.

So then you can make a redirect to reach from www.mydomain.com

So the steps working for me are:


Name your databases as: mydomain_com (replace dot with underscore).


change this line in C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\config.py


group.add_option(“-p”, “–http-port”, dest=”http_port”, my_default=8069,


group.add_option(“-p”, “–http-port”, dest=”http_port”, my_default=80,


change this lines in C:\Program Files (x86)\Odoo 11.0\server\odoo.conf

dbfilter = %h

http_port = 80

4) Restart odoo service

5) Point your record A to ip of your odoo site

The same steps should work (changing paths) on linux configuration.


[themoneytizer id=26103-16]

Comments (2)

  1. Hi,
    very good article.
    how about subdomain name

Comment here