需求:本地启动的一个服务,url是http://127.0.0.1:8089/,希望访问域名dev.e-buy.com/指向到该服务,配置如下,
配置:nginx.conf中配置如下:
server {
listen 80;
server_name dev.e-buy.com;
location / {
proxy_pass http://127.0.0.1:8089/ ;
index index.html index.htm;
}
}