How to rewrite url to match root directory?

73 Views Asked by At

I have this url: http://example.com/resources/app/app.css

And the file is here in my filesystem: /home/neuquino/www/app/app.css

So, I want to have something like this:

location /resources(.*) {
  root /home/neuquino/www;
}

How can I make this rewrite to work on Nginx?

NOTE: creating /home/neuquino/www/resources directory is not an option for me.

1

There are 1 best solutions below

0
On BEST ANSWER

As commented in the question, the solution was to use the alias instruction.

location /resources/ {
  alias /home/neuquino/www/;
}