PhantomJS的Nginxconfiguration

我有一个AngularJS 1.x应用程序,我正在优化它的search引擎优化。 为了做到这一点,我使用了angular-seo 。 整个configuration完成后,我启动PhantomJS:

phantomjs --disk-cache=no angular-seo-server.js 8888 http://localhost/beta/index.html 

并且,下面的命令:

 curl http://localhost:8888/?_escaped_fragment_=/ 

正常工作,返回呈现的页面。

用PhantomJSconfigurationnginx,但是,我有一些问题。 我已经添加到我的nginxconfiguration:

 location /beta if ($args ~ _escaped_fragment_) { rewrite ^ /snapshot$uri; } } location ~ ^/snapshot(.*) { rewrite ^/snapshot(.*)$ /$1 break; proxy_pass http://localhost:8888; proxy_set_header Host $host; proxy_connect_timeout 60s; } 

/beta是我的应用程序位置。 我试着运行这个命令:

 curl http://example.com/beta/?_escaped_fragment_=/ 

但是这返回一个404页面。

我哪里做错了? 我对nginx和phantomjs是新手,所以我可能犯了一个愚蠢的错误。

请原谅我英语不好。