WebAPI上线后,请一定要注意你的host文件是否配置,😔居然忘了排查这种低级问题。。。。
beego的Nginx反向代理配置
server {
listen 80;
server_name ***.*****.com;
charset utf-8;
access_log /data/logs/nginx/****_access.log json;
error_log /data/logs/nginx/*****_error.log;
location / {
try_files /_not_exists_ @backend;
}
location @backend {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:9001;
}
}
网友评论