Community mailing list archives

community@mail.odoo.com

Re: Nginx and barcode problem

by
cubells
- 04/19/2016 23:03:55
El 19/04/16 a les 08:24, Annisa From Port Cities ha escrit:
> Where did you set the fail_timeouts ?
>


Thanks Annisa.

all my nginx file:



upstream openerpweb {
     server 127.0.0.1:8069 weight=1 fail_timeout=300s;
}

server {
     listen 80;
     server_name mydomain.net;
     return 301 https://yosan.blogdns.com$request_uri;
}

server {
     # server port and name
     listen        443 default;
     server_name   mydomain.net;
     add_header Strict-Transport-Security max-age=2592000;

     # Specifies the maximum accepted body size of a client request,
     # as indicated by the request header Content-Length.
     client_max_body_size 200m;

     # ssl log files
     access_log    /var/log/nginx/openerp-access.log;
     error_log    /var/log/nginx/openerp-error.log;

     log_format main '$http_x_forwarded_for - $remote_user [$time_local] 
"$host" "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $request_time';

     # ssl certificate files
     ssl on;
     ssl_certificate        /etc/ssl/nginx/server.crt;
     ssl_certificate_key    /etc/ssl/nginx/server.key;

     # add ssl specific settings
     keepalive_timeout    60;

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

     # increase proxy buffer to handle some OpenERP web requests
     proxy_buffers 16 64k;
     proxy_buffer_size 128k;

     location / {
         proxy_pass    http://openerpweb;
         # force timeouts if the backend dies
         proxy_next_upstream error timeout invalid_header http_500 
http_502 http_503;

         # set headers
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

                 # set timeouts
                 proxy_connect_timeout       600;
                 proxy_send_timeout          600;
                 proxy_read_timeout          600;
                 send_timeout                600;

         # Let the OpenERP web service know that we're using HTTPS, 
otherwise
         # it will generate URL using http:// and not https://
         proxy_set_header X-Forwarded-Proto https;

         # by default, do not forward anything
         proxy_redirect off;
     }

     # cache some static data in memory for 60mins.
     # under heavy load this should relieve stress on the OpenERP web 
interface a bit.
     location ~* /web/static/ {
         proxy_cache_valid 200 60m;
         proxy_buffering    on;
         expires 864000;
         proxy_pass http://openerpweb;
     }

}
	


-- 
Atentament, cubells.
--