Nginx 反向代理路由器

路由器映射端口 伪装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; }
上一篇:星辉信息odoo教程 - 中型企业如何信息化


下一篇:Odoo 微信Oauth免登录模块