Jump to content

SSL Odoo 17 Nginx Proxy Manager

I found out how to configure (nginx proxy manager) with odoo using ssl, lets encrypt

This is assuming you already know how to configure (NPM)

 

Issue:

web editor constant loading / forever loading. editor not working with ssl enabled in nginx proxy manager

Spoiler

Screenshotfrom2024-05-2506-24-21.thumb.png.81895198f3206051d2fb2aa8b0b943df.png

 

Solution:

in odoo docker container edit file located in /etc/odoo/odoo.conf

add

proxy_mode=true

 

 

in nginx proxy manager

enable web sockets

Screenshotfrom2024-05-2506-39-12.png.52ea6549d9d49bf427068f51d43e7040.png

 

next, custom locations tab:

add "/" in define location

then
 

proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Add Headers for odoo proxy mode
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;

Screenshotfrom2024-05-2506-39-30.png.26e4d53db5d0ae95d65265841fdf670c.png

 

then "add location"

"/websocket" in define location

then

proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Add Headers for odoo proxy mode
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;

Screenshotfrom2024-05-2506-39-42.png.723b433c6f446ee4f65afd76072f122b.png

 

next advance tab:

under custom nginx configuration add

# common gzip
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 500M;
sendfile on;
send_timeout 600s;
keepalive_timeout 300;

Screenshotfrom2024-05-2506-49-14.png.7cb1e287c28b342a3a7f04ea855d37df.png

 

 

edit website should work. make sure to clear cookies. if you get "parts of this page are not secure such as images" delete all  your uploaded photo and re upload them.

another note: i have my cloudflare "SSL/TLS encryption mode is Full (strict)"

 

 

this instruction is off of:

https://www.odoo.com/forum/help-1/how-to-configure-nginx-proxy-manager-for-odoo-16-245339

and

https://github.com/crottolo/odoo_auto_install/tree/main?tab=readme-ov-file

 

I made this so i dont forget also many people have been having this issue and the solution isn't easy to find. Hopefully this will help someone. any questions please reply. sorry if this tutorial sucks

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×