Serving a file with nginx

Posted by jmetz on Server Fault See other posts from Server Fault or by jmetz
Published on 2012-11-01T03:13:04Z Indexed on 2012/11/01 5:04 UTC
Read the original article Hit count: 567

Filed under:
|
|
|

I have a webapp built in angular.js and angular. Since angular takes care of most urls by itself, i want to serve the file indexAng.html (along with any arguments) in response to a request for /search/?arg1=x&arg2=y

I've tried to do this with location blocks like this:

location /search/ {
    alias /home/dotcloud/current/static/public/;
    index indexAng.html;
}

This seems to work, but i don't know how to serve the arguments with it. How do I serve arguments with indexAng.html, and is there a better or more appropriate way to go about this?

© Server Fault or respective owner

Related posts about nginx

Related posts about django