I want to make use of the alias function in NGINX to accomplish something simple. I have searched the internet for the last 3 days and found nothing but bad or outdated examples and was hoping someone could post a working example based on a newer version of NGINX.
I have the following url:
http://mysite.com/username_123
My question is how do I make NGINX forward this request to the internal user folder:
html/profiles/username_123
...and return its index.php page?
Please keep in mind that this index.php page is passed to the php FastCGI server listening on 127.0.0.1:9000
Funny, I had the same problem finding useful information about apache style aliasing or script aliasing. I ended up blogging about it the other day.
This was tested with nginx version 1.0.5, but should work on 0.85 also.