#proxy_temp_path /tmp/nginx_proxy_temp;
#proxy_cache_path  /tmp/nginx_proxy_cache levels=1:2  keys_zone=oecache:100m inactive=3d max_size=1000m;
#proxy_buffer_size     32k;              #设置代理服务器（nginx）保存用户头信息的缓冲区大小
#proxy_buffers         4 32k;            #proxy_buffers缓冲区，网页平均在32k以下的话，这样设置
#proxy_busy_buffers_size  64k;           #高负荷下缓冲大小（proxy_buffers*2）
#proxy_temp_file_write_size  64k;       #设定缓存文件夹大小，大于这个值，将从upstream服务器传
#proxy_connect_timeout      60;
#proxy_send_timeout         60;
#proxy_read_timeout         3000;
upstream odoo2.odoo123.com{
      server 127.0.0.1:8069;
}
server {
        server_name  odoo2.odoo123.com;  #注意更改为实际域名
        root /home/od8/; # 注意更改为addons的实际路径
	#Add SSL enable https
    listen 443;
    ssl on;
    ssl_certificate /usr/local/nginx/conf/server.crt;
    ssl_certificate_key /usr/local/nginx/conf/server.key;

        location /{
		# try_files $uri $uri/ /home/od8/source/openerp/addons;
                #proxy_cache              oecache;
                #proxy_cache_key "$host$request_uri$request_body";
                #proxy_cache_key $host$request_uri$request_body;
                #proxy_cache_valid  200 304 1d;
                #proxy_cache_valid  any   1d;
                #proxy_next_upstream http_502 http_504 error timeout invalid_header;
                #proxy_pass_header Set-Cookie;
                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_redirect  off;
                proxy_pass http://odoo2.odoo123.com;
                #proxy_buffering on;
                #proxy_cache_valid       1d;
                #expires 1d;
        }
        #location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
		#gzip on;
		#gzip_min_length 1k;
		#gzip_buffers 4 16k;
		#gzip_http_version 1.0;
		#gzip_comp_level 2;
		#gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
		#gzip_vary off;
		#gzip_disable "MSIE [1-6]\.";
                #proxy_buffering on;
                #proxy_cache_valid       1d;
                #expires 1d;
		#proxy_set_header Accept-Encoding 'gzip';
		#proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 ;
        #}
}
