# Optimise Lucee Resource Mapping for /farcry

**URL:** <https://discourse.farcrycore.org/t/optimise-lucee-resource-mapping-for-farcry/515>\
**Category:** howto\
**Created:** [January 19, 2016, 3:48am UTC](https://discourse.farcrycore.org/t/optimise-lucee-resource-mapping-for-farcry/515 "2016-01-19T03:48:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![modius](https://discourse.farcrycore.org/user_avatar/discourse.farcrycore.org/modius/32/1197_2.png) [@modius](https://discourse.farcrycore.org/u/modius)\
**Post date:** [January 19, 2016, 3:48am UTC](https://discourse.farcrycore.org/t/optimise-lucee-resource-mapping-for-farcry/515/1 "2016-01-19T03:48:46Z")

</div>

When setting up a FarCry web app its usual to configure a resource mapping for `/farcry` to grant the application access to the framework. It’s also very common to create a specific admin virtual/alias on the web server that points direct to the the `/webtop`.

For example on NGINX, you might use something like:

```plaintext
    location /webtop {
        alias /var/www/farcry/core/webtop;
        try_files $uri $uri/ $uri.index.cfm $uri/index.cfm;
    }

```

_Note, you can always just dump the entire framework into the webroot but mapping resources is a much better approach._

For the `/farcry` mapping in Lucee there are two very important settings:

1. **Inspect Templates** : set this to `Once (Good)`; this will give you a significant performance boost whilst still allowing you to make changes to files while you are developing
2. **Web Accessible** : set this to `blank` or `Unchecked`; flagging the resource as not accessible via the web adds additional security to your environment, and makes sure you don’t accidentally expose a vulnerability in your application by allowing malicious users to address templates out of context directly via the web

If you are adjusting your `lucee-web.xml.cfm` configuration file directly, then a correctly configured `/farcry` mapping would look something like:

```auto
<mapping 
  inspect-template="once" 
  physical="{web-root-directory}/farcry" 
  primary="physical" 
  toplevel="false" 
  virtual="/farcry"/>

```

_Note, `toplevel="false"` is the flag for “Web Accessible”._

---

<div class="post-metadata">

**Author:** ![modius](https://discourse.farcrycore.org/user_avatar/discourse.farcrycore.org/modius/32/1197_2.png) [@modius](https://discourse.farcrycore.org/u/modius)\
**Post date:** [January 19, 2016, 10:24pm UTC](https://discourse.farcrycore.org/t/optimise-lucee-resource-mapping-for-farcry/515/2 "2016-01-19T22:24:27Z")

</div>

> [@modius](#):
>
> Inspect Templates: set this to Once (Good); this will give you a significant performance boost whilst still allowing you to make changes to files while you are developing

Setting this value to **Never** in production is best, but means you can’t change `.cfm/.cfc` files and see them recompiled by Lucee without restarting the server; not great for development.
