Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Serve POS over http ?

on 12/3/14, 4:34 AM 975 views


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 ?


There is my nginx configuration :

upstream odoo {

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;

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.

Rooms For (Hong Kong) Limited, Yoshi Tashiro
on 1/12/15, 12:15 AM

Same problem here. Could you solve it?

on 3/25/16, 1:04 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 12/3/14, 4:34 AM
Seen: 975 times
Last updated: 9/10/16, 4:51 PM