Nginx redirect within the same server

clwen asked:

If I have a server foo.com which has a root directory ~/public_html/foo. For some reasons I want to use the same server config but point the request from foo.com/test/ to ~/public_html/test. Any hints on how can I do that? rewrite? location?

My answer:


alias. That should be about all the hint you asked for.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.