server {
listen 80;
server_name localhost;
location / {
index index.html;
root /Users/Lin/Codes/JS/Emberjs/yeoman-ember/dist;
}
location ~* ^/json {
root
proxy_pass http://localhost:9292;
}
}
配置有点工作,但它只通过
localhost:9292/json to localhost/json.
但我想要的是
localhost:9292/json to 'localhost'
`localhost:9292/json/post 到 'localhost/post'
我想我需要做的是设置root或进行一些重写,有人有什么想法吗?