# Error\_page with try\_files

**URL:** <https://www.ruby-forum.com/t/error-page-with-try-files/189293>\
**Category:** NGINX\
**Created:** [May 28, 2010, 5:48am UTC](https://www.ruby-forum.com/t/error-page-with-try-files/189293 "2010-05-28T05:48:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcos\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@Marcos\_N](https://www.ruby-forum.com/u/Marcos_N)\
**Post date:** [May 28, 2010, 5:48am UTC](https://www.ruby-forum.com/t/error-page-with-try-files/189293/1 "2010-05-28T05:48:41Z")

</div>

I want to check if the user has a custom error page, if not shows a  
default inside nginx basedir.

error\_page 404 403 502 503 504 = @error;

```
location @error {
  try_files /404.htm /404.html /404.php (how to point to a file

```

outside document root?);  
}

Marcos N.  
+55 44 9918-8488
