Good Directive vs Bad Directives

Francis Daly francis at daoine.org
Wed May 2 11:38:07 UTC 2012


On Tue, May 01, 2012 at 06:34:57PM -0700, antituhan wrote:

Hi there,

> Ok, basicly it's just a different directive (simple and 'crowded'
> directive), isn't it ?

It's a different directive, that does different things.

> So, the conclusion is that "if"
> directive is same as "try_files", the different is only on the simplicity,
> and it's not causing cpu/mem high load, right?

"if" can do a lot more than try_files, but has its own pitfalls when
used within location{}.

If what you want is "if this file exists, process it; otherwise do this
other thing", that is what try_files is for.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list