I would like to configure nginx so that
- The requested path is a static file, serve it;
- otherwise redirect an external domain:
http://example.net/.
I do understand that I need to use the try_files directive, but I do not understand how to implement the fallback mechanism.
Found after many tests. What happens if a static file is not found is defined in the last parameter of
try_files. You can set that parameter to an internal location. In my case I used