Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


ERP - Odoo Thảo luận chung về Vtiger CRM, Sugar CRM

Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 25-12-2021, 02:15 AM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
Cấu hình loadbalancing nginx cho Odoo
Cấu hình loadbalancing nginx cho Odoo


Trên Server Nginx bạn tạo file:


/etc/nginx/sites-enabled/xyz.com.conf




Mã:

upstream backend  {
       server 192.168.1.51:8069;
       server 192.168.1.52:8069;
       server 192.168.1.53:8069;
       server 192.168.1.54:8069;
}

upstream backend-longpolling {
server 192.168.1.51:8072;
server 192.168.1.52:8072;
server 192.168.1.53:8072;
server 192.168.1.54:8072;
}

server {
   server_name xyz.com www.xyz.com;

   location / {
       return 301 https://$server_name$request_uri;
    }
}




server {
listen          443 ssl;

server_name xyz.com www.xyz.com;
proxy_connect_timeout       60000;
proxy_send_timeout          60000;
proxy_read_timeout          60000;
send_timeout                60000;

ssl_dhparam /etc/ssl/certs/dhparam.pem;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_intercept_errors on;

location /longpolling {
     proxy_pass http://backend-longpolling;
}

location / {
          proxy_pass http://backend;
}

ssl_certificate /etc/nginx/ssl/www_xyz_com.crt; 
ssl_certificate_key /etc/nginx/ssl/www_xyz_com.key;
}
Tham khảo: https://silentinfotech.com/blog/inst...-ubuntu-16-04/


https://infrastacklabs.wordpress.com...parate-server/
  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 05:05 AM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.