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
到localhost/json
.
但我想要的是
localhost:9292/json
到“本地主机”
localhost:9292/json/post
到“本地主机/帖子”
我想我需要做的是设置root或进行一些重写,有人有什么想法吗?