Comments (6)
Hi @killmasta93 ,
I usually set these couple parameters, base url and freeze. If you don't set web.base.url.freeze to True, the web.base.url will be changed every login. Please skip it if you already did.
When we deploy Odoo with a proxy (nginx, traefik, caddy, ...), we should configure proxy_mode = True in odoo.conf.
https://github.com/minhng92/odoo-16-docker-compose/blob/master/etc/odoo.conf#L88
from odoo-16-docker-compose.
Hi @killmasta93 , your configuration looks fine. I've never met this issue, but I guess this weird come from the proxy. Try again with one these samples:
- Sample from official Odoo documentation: https://www.odoo.com/documentation/16.0/administration/install/deploy.html#id7
- My production config
server {
listen 443 ssl;
server_name odoo.**********************************************;
ssl_certificate **********************************************;
ssl_certificate_key ******************************************;
ssl_prefer_server_ciphers on;
sendfile on;
charset utf-8;
# max upload size
client_max_body_size 50G; # adjust to taste
proxy_read_timeout 600000;
proxy_connect_timeout 600000;
proxy_send_timeout 600000;
proxy_set_header Connection keep-alive;
location / {
proxy_pass http://**.***.***.**:10016/;
}
location /longpolling/ {
proxy_pass http://**.***.***.**:20016/longpolling/;
}
}
from odoo-16-docker-compose.
thank you so much
from odoo-16-docker-compose.
Hi again, wanted to reopen the bug, as whats odd is that on the login screen when i login it changes back to the internal IP
already have the web freeze
this only happens in the login screen
the rest is working fine
it seems when i try to login in the Request URL
Request URL: https://odoo.domain.com/web/login
Request URL: https://odoo.domain.com/web/login
Request Method: POST
Status Code: 303
Remote Address: xxxxxx:443
Referrer Policy: strict-origin-when-cross-origin
which it loops back to the internal IP
not sure if its a nginx issue or ODOO
NGINX Proxy using SWAG
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name odoo.*;
include /config/nginx/ssl.conf;
# 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;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header HTTP_X_FORWARDED_HOST $remote_addr;
client_max_body_size 0;
if ($lan-ip = yes) { set $geo-whitelist yes; }
if ($geo-whitelist = no) { return 404; }
# increase proxy buffer size
proxy_buffers 16 64k;
proxy_buffer_size 128k;
proxy_read_timeout 900s;
proxy_connect_timeout 900s;
proxy_send_timeout 900s;
# force timeouts if the backend dies
proxy_next_upstream error timeout invalid_header http_500 http_502
http_503;
types {
text/less less;
text/scss scss;
}
# enable data compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript application/pdf image/jpeg image/png;
gzip_vary on;
client_header_buffer_size 4k;
large_client_header_buffers 4 64k;
location / {
proxy_pass http://192.168.6.20:10016;
# by default, do not forward anything
proxy_redirect off;
}
location ~* .(js|css|png|jpg|jpeg|gif|ico)$ {
expires 2d;
proxy_pass http://192.168.6.20:10016;
add_header Cache-Control "public, no-transform";
}
# cache some static data in memory for 60mins.
location ~ /[a-zA-Z0-9_-]*/static/ {
proxy_cache_valid 200 302 60m;
proxy_cache_valid 404 1m;
proxy_buffering on;
expires 864000;
proxy_pass http://192.168.6.20:10016;
}
}
Thank you
from odoo-16-docker-compose.
hi @minhng92 i was wondering if you got a chance to look at the error?
Thank you
from odoo-16-docker-compose.
yeah that worked perfectly
from odoo-16-docker-compose.
Related Issues (15)
- How to update HOT 2
- I have a problem editing the site
- Error restore database
- websocket not working with reverse proxy on odoo 16 HOT 1
- run.sh has docker-compose which is deprecated HOT 1
- wkhtmltopdf doesnt render icon
- Odoo Shell inside docker HOT 1
- possibility to include debugpy on the docker instances and changing debug level of the instance
- custom addons HOT 5
- How to upgrade from community to enterprise? HOT 1
- wkhtmltopdf HOT 2
- Can't print any document HOT 2
- timezone issue HOT 2
- for activation custom addons HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odoo-16-docker-compose.