Enable IIS redirect and https for odoo on Windows server

Install below IISdependencies

Microsoft Application Request Routing 3.0 (x64)
URL Rewrite

IIS certificate installation & configuration is not covered here.

Add Reverse proxy rules

Once the module is installed in IIS, you will see a new Icon in the IIS Administration Console, called URL Rewrite. This icon is present at the level or each site and web-application you have in the server, and will allow you to configure re-write rules that will apply from that level downwards.

Setup a Reverse Proxy rule using the Wizard.

Open the IIS Manager Console and click on the Default Web Site from the tree view on the left. Select the URL Rewrite Icon from the middle pane, and then double click it to load the URL Rewrite interface.

Chose the ‘Add Rule’ action from the right pane of the management console, and the select the ‘Reverse Proxy Rule’ from the ‘Inbound and Outbound Rules’ category.

Now we can proceed to fill in the routing information based on the diagram above in the Wizard window that is provided to us.

Please make sure odoo is accessible from the same server http://localhost:8069 or change the below as per your odoo URL.

If you want to enable redirect from http to https follow the below URL and make sure to put it as the first rule. ( Use “Move up” arrow after you write the redirect rule)


Find below my web.config file for the ERP site. Could not upload the file as wordpress does not allow me do so.

Odoo – Nginx – Logout URL

If your odoo site redirects from your public address to the local IP address when logout.
Add the following settings under in nginx config and set proxy_mode = True in odoo config.

proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $http_host;
proxy_headers_hash_bucket_size 64;