您好,欢迎访问代理记账网站
  • 价格透明
  • 信息保密
  • 进度掌控
  • 售后无忧

配置odoo服务为80端口

配置odoo服务为80端口

  • 一. 下载nginx
  • 二. 配置nginx

一. 下载nginx

  1. 下载nginx
    sudo apt install nginx
  2. 检查nginx是否安装成功
    nginx -v
  3. 检查nginx配置文件是否有错
    nginx -t

二. 配置nginx

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    gzip  on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    upstream odooserver{
        server 127.0.0.1:8069;
    }
    server {
        listen       80;
        server_name   localhost;
        root /usr/lib/python3/dist-packages/odoo/addons;
        location /{
            proxy_pass http://odooserver;
            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_pass_header Set-Cookie;
            proxy_connect_timeout      60;
            proxy_read_timeout         3000;
        }
location /longpolling/{
            proxy_pass http://127.0.0.1:8072/longpolling/;
            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;
        }
    }
}


分享:

低价透明

统一报价,无隐形消费

金牌服务

一对一专属顾问7*24小时金牌服务

信息保密

个人信息安全有保障

售后无忧

服务出问题客服经理全程跟进