Cài đặt nginx cho máy chủ:
sudo apt-get install nginx
Tập tin kết nối với phần mềm: / etc / nginx / trang web được kích hoạt tập tin odoo.hbsprogram.com
server {
listen 80;
server_name odoo.hbsprogram.com;
add_header Strict-Transport-Security max-age=2592000;
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 $scheme;
location / {
proxy_pass http://127.0.0.1:8069;
}
}
Không thể thiếu
service nginx restart
service odoo restart
Hủy bỏ truy cập từ ip
/etc/odoo-server.conf
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1