Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
9200 Vistas

Hi,

The posbox does not work in chrome when pos is in https. I try to configure nginx to serve /pos/web over http and the rest over https but it doesn't works. See https://github.com/odoo/odoo/issues/2031

Nginx redirects correctly in http but i receive a 404 error. Can you tell me where is the error ? or someone has already done this in apache ?

Thanks.

There is my nginx configuration :

upstream odoo {
server 127.0.0.1:8069;
}

server {
listen 443 default;
server_name erp.example.com;

access_log  /var/log/nginx/oddo.access.log;
error_log   /var/log/nginx/oddo.error.log;

ssl on;
ssl_certificate     /etc/nginx/ssl/publickey.crt;
ssl_certificate_key /etc/nginx/ssl/privatekey.key;
keepalive_timeout   60;

ssl_ciphers             HIGH:!ADH:!MD5;
ssl_protocols           SSLv3 TLSv1;
ssl_prefer_server_ciphers on;

proxy_buffers 16 64k;
proxy_buffer_size 128k;

location ~ ^/pos/ {
    rewrite ^(.*)$ http://$host:80$1 permanent;
}

location / {
    proxy_pass  http://odoo;
    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
    proxy_redirect off;

    proxy_set_header    Host            $host;
    proxy_set_header    X-Real-IP       $remote_addr;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header    X-Forwarded-Proto https;
}

location ~* /web/static/ {
    proxy_cache_valid 200 60m;
    proxy_buffering on;
    expires 864000;
    proxy_pass http://odoo;
}
}

server {
listen 80;
server_name erp.example.com;

location ~ ^(?!/pos/|/web/binary/company_logo).*$ {
  if ($request_method != POST) {
    # rewriting a POST request has no sense as the browser will do the request as GET
    rewrite ^(.*)$ https://$host:443$1 permanent;
  }
  if ($request_method = POST) {
    proxy_pass https://$host;
  }
}
}

Avatar
Descartar

I use apache and I also have problem with forcing http for POS session.  I get an error "GET https://xxx.com/web/session/get_session_info 400 (BAD REQUEST)" and the screen goes blank.

Same problem here. Could you solve it?

Mejor respuesta

Hi, 

If someone still facing this issue, then here is the fix. Please go through this blog: 

https://webkul.com/blog/serve-odoo-posbox-over-https


I have also create ODOO POSBOX Image having nginx installed in it, which can be easily connects with ODOO served over https.

Download Link : https://drive.google.com/file/d/0B1dx-UuV9AOYbWZSNG1GVjBPOTQ

I hope it will help someone.

Mohit

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
sept 20
5691
2
may 24
6913
3
may 24
16056
2
nov 19
6837
0
dic 22
2123