xin

Directive reference

try_files

Tests candidate files and falls back to a URI, named location or status.

Syntaxtry_files file ... uri;
Contextsserverlocation
Defaultnone

Behavior

Candidates use the active root or alias. Only the final argument is a fallback; earlier arguments are filesystem probes.

Example

try_files $uri $uri/ @app;

Related directives

root · alias · location