root and alias with php5-fpm

Francis Daly francis at daoine.org
Wed Sep 9 07:45:26 UTC 2015


On Tue, Sep 08, 2015 at 09:23:08AM -0500, Kristofer Pettijohn wrote:

Hi there,

> When I do that, and use "root" instead of "alias" inside of
> "location /grant", it works.  However, inside of the path I need to
> create a symlink "ln -s . grant/" with how the root directive looks
> for any static files.  This is the part I am trying to avoid.  Which
> tells me that I should be using "alias" instead of "root"

I confess that I have become confused about what behaviour you want,
and what behaviour you see, and what configuration you are using when
you see the behaviour that you see.

When you make a request for /grant/one/yes.txt, what file on your
filesystem do you want nginx to serve?

When you make a request for /grant/one/yes.php, what file on your
filesystem do you want nginx to tell the fastcgi server to process?

When you make a request for /grant/one/no.txt, what file on your
filesystem do you want nginx to tell the fastcgi server to process
(because the file does not exist)?

And which of those do not do what you want, using your current
configuration?


> But then if I use "alias", it breaks completely, which I do not understand.
> 
> If I use @fallback, I see the same exact behavior with root vs.
> alias, as I see when I use "/grant/index.php?$args" in try_files.

This confuses me too. There is no "root" or "alias" in the suggested
@fallback location. So I suspect that I am misunderstanding something.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list