路由器映射端口 伪装ip 信息
server {
listen 80;
server_name erp.rongbiz.com;
# Add Headers for odoo proxy mode
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
# log
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
# Redirect longpoll requests to odoo longpolling port
# Redirect requests to odoo backend server
location / {
proxy_redirect ~^http://222.173.94.214:4081(.*) http://erp.rongbiz.com$1;
proxy_pass http://222.173.94.214:4081;
}
# common gzip
gzip_types text/css text/scss text/plain text/xml application/xml
application/json application/javascript;
gzip on; }