如何用play和angularjs代理设置nginx

我正在用nginx学习play framework和angularjs。 该游戏应用程序运行在9090端口上,而angularjs应用程序运行在9000上 。 我试图代理/app/*所有请求到后端播放应用程序我曾尝试一些nginxconfiguration成功率较低。 下面是我尝试的/etc/nginx/sites-available/default文件。

 server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; index index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { proxy_pass http://127.0.0.1:9000; } location /app { proxy_pass http://127.0.0.1:9090; } }