CẤU HÌNH BẬT SSL VÀ REDIRECT HTTPS ODOO BẰNG IIS
Source:
- https://shyju.wordpress.com/2019/04/10/enable-iis-redirect-and-https-for-odoo-on-windows-server/
- https://www.ssl.com/how-to/redirect-http-to-https-with-windows-iis-10/
1. DOWNLOAD VÀ CÀI ĐẶT:
2. CẤU HÌNH PROXY
Enable Proxy
Open IIS Management console >> application request routing

Open proxy settings

Enable Proxy

3. CẤU HÌNH REVERSE PROXY RULE
Lưu ý: khi tạo xong rule nhờ "move up" redirect rule lên trên reverse proxy rule nhé

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.

4. CẤU HÌNH REDIRECT TO HTTPS
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)
- Download and install the IIS URL Rewrite module, then launch IIS Manager.
- Select the website you want to apply redirection to, then double-click URL Rewrite.
- Click Add Rule(s)…
- Select Blank rule in the Inbound rules section, then click the OK button.
- Give your redirect an easy-to-remember name.
- In the Matched URL section:
- Set Requested URL: to Matches the Pattern.
- Set Using to Regular Expressions.
- Enter (.*)as the Pattern.
- Check Ignore case.
- Set Requested URL: to
- Scroll down to Conditions and expand the section if necessary. Select Match Allfor Logical grouping, then click the Add… button.
- A dialog box will open:
- Type {HTTPS}in the Condition input field.
- Set Check if input string to Matches the Pattern.
- Type ^OFF$in the Pattern field.
- Check Ignore case.
- Click the OK button.
- Type
- You should now see your condition in the list.
- Scroll down to the Action section and enter these settings:
- Select Redirectas the Action type.
- Type https://{HTTP_HOST}/{REQUEST_URI}in the Rewrite URL field.
- Uncheck Append query string.
- Set Redirect type to Permanent (301).
- Select
- Click Apply in the right-hand Actions menu.
Comments
Post a Comment