Skip to content

Commit 9be6b3b

Browse files
committed
Merge branch 'master' of https://github.com/lucee/lucee-docs
2 parents f042be9 + 46d74f4 commit 9be6b3b

File tree

7 files changed

+142
-42
lines changed

7 files changed

+142
-42
lines changed

docs/00.home/homepage.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ To find out more about getting involved as a developer with Lucee, checkout our
2020

2121
**New!** We have added a whole series of detailed [[Recipes]] showing you how to take advantage of the wide range of features in Lucee.
2222

23+
## Deploying Lucee
24+
25+
[[deploying-lucee-server-apps]] - How to configure and deploy Lucee
26+
27+
[[locking-down-lucee-server]] - Security best practices for Lucee
28+
29+
[[config]] - All about Lucee's configuration file
30+
2331
## Lucee 6.2
2432

2533
Lucee 6.2 is our upcoming next major release, currently at the Release Candidate stage, including enhanced Java and Maven integration, Jakarta Servlet support and better runtime performance, up to 50% faster than Lucee 5.4.

docs/04.guides/12.deploying-lucee-server-apps/04.locking-down-lucee-server/page.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,19 @@ Make sure the WEB-INF directory is locked down. You will need to configure your
1414

1515
To disable detailed error messages in Lucee, log in to the Lucee server administrator and go to Settings -> Error -> and select "error-public.cfm" from the drop down options. This will only display an extremely generic and uninformative error message to the end-users.
1616

17+
```
18+
{
19+
"errorGeneralTemplate": "/lucee/templates/error/error-public.cfm",
20+
"errorMissingTemplate": "/lucee/templates/error/error-public.cfm"
21+
}
22+
```
23+
1724
### Ensure All Administrators for All Contexts Have Passwords Assigned and Use Captcha ###
1825

1926
In the Lucee Server Administrator, go to Security -> Password. From this screen you can set the passwords of all existing web contexts and enable captcha's to prevent brute-forcing password breaking attempts on your Lucee Server & Web Administrators
2027

28+
The Lucee Admin can be disabled by setting the env var `LUCEE_ADMIN_ENABLED=false` which is **recommended** for production/internet facing servers
29+
2130
### Reduce Request Timeouts as Low as Possible ###
2231

2332
To change the Request Timeout value, log in to the Lucee server administrator and go to Settings -> Application -> Request Timeout. It is recommended you change it from 50 seconds to about 10 or so. Experiment with this to make sure the request timeouts do not effect needed functionality that may exist in your application.

docs/04.guides/12.deploying-lucee-server-apps/page.md

Lines changed: 63 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ related:
77
- running-lucee-system-properties
88
- locking-down-lucee-server
99
- relocating-web-inf
10+
- cookbook-check-for-changes
11+
- config
1012
forceSortOrder: '22'
1113
---
1214

@@ -16,57 +18,92 @@ forceSortOrder: '22'
1618

1719
[[locking-down-your-lucee-stack]]
1820

19-
There is a `/deploy` folder under the `/lucee-server/` folder which can be used to drop in updates to Lucee.
21+
## The deploy folder
2022

21-
The `/deploy` folder is polled every 60 seconds by Lucee's Controller thread. It looks for (`.lex`) file and (`.lco`) files.
23+
There is a `/deploy` folder under the `/lucee-server/` folder which can be used to customize Lucee .
2224

23-
If Lucee finds an extension `.lex` (in the `/deploy` folder), it installs it (copying it to the `/installed` folder, among other things).
25+
The `/deploy` folder is polled on startup and every 60 seconds by Lucee's Controller thread. It looks for `.lex` files (extensions), `.lco` files (lucee updates) and `.json` files for CFconfig snippets.
2426

25-
If Lucee finds a `.lco` jar (in the `/deploy` folder), it copies it to the `/patches` folder, then it forces the engine to reload that core version immediately.
27+
This is the simplest way to configure / install your Lucee instance at startup or on the fly, without needing to restart it.
2628

27-
However, if there is already a newer Lucee core version in the `/patches/` folder, any older version will simply be ignored. In that case, you need to delete any newer `.lco` files from `/patches/` folder beforehand.
29+
### .json - CFConfig.json
2830

29-
`/deploy` is polled every 60 seconds, `/patches` is only checked at startup.
31+
Since Lucee 6.1.1, if Lucee finds a `*.json` (in the `/deploy` folder) it will be automatically imported and applied to your running `CFconfig` configuration. [LDEV-4994](https://luceeserver.atlassian.net/browse/LDEV-4994)
32+
33+
You can also configure Lucee to [[cookbook-check-for-changes|monitor the server's .CFConfig.json file for changes]].
3034

31-
The `/deploy` folder is just a shortcut way to install the `.lco` version into the patches folder of a running Lucee server without needing to restart it.
35+
### .lex - Extensions
3236

33-
The `/patches` folder is where Lucee's core `.lco` jars are kept. When Lucee starts, it determines which `*.lco` in that folder is the latest version and it loads that version.
37+
If Lucee finds an extension `.lex` in the `/deploy` folder, it will be installed (copying it to the `/installed` folder, among other things).
3438

3539
Extensions (`.lex`) can also be dropped in the `/lucee-server/context/extensions/available` folder and they can be installed using environment or JVM arguments without Lucee reaching out to the update provider.
3640

37-
## Firewalled Servers
41+
### .lco - Lucee core updates
3842

39-
`.lco` updates either via the Lucee Admin update page, or by dropping into the `/deploy` folder, may require dynamically downloading any updated jar files from the update server. As such they may fail attempting to download the new files.
43+
If Lucee finds a `.lco` jar in the `/deploy` folder, it copies it to the `/patches` folder, then it forces the engine to reload that core version immediately.
4044

41-
To update firewalled servers, or to upgrade without Lucee downloading bundles (which is slightly slower), do the following
45+
However, if there is already a newer Lucee core version in the `/patches/` folder, any older version will simply be ignored. In that case, you need to delete any newer `.lco` files from `/patches/` folder beforehand.
4246

43-
1. Stop the server
44-
2. Download the (fat) lucee.jar (see below) from [https://download.lucee.org/](https://download.lucee.org/)
45-
3. Delete or change the file extension for the fat jar in the `lucee/lib` folder, i.e `5.4.3.2.jar`
46-
4. Copy the updated `lucee.jar` into that `lucee\lib` folder
47-
5. Start the server
47+
`/deploy` is polled every 60 seconds, `/patches` is only checked at startup.
48+
49+
The `/patches` folder is where Lucee's core `.lco` jars are kept. When Lucee starts, it determines which `*.lco` in that folder is the latest version and it loads that version.
4850

49-
## Lucee Distributions
51+
### Lucee Distributions
5052

5153
available from [https://download.lucee.org/](https://download.lucee.org/)
5254

53-
- **Lucee.jar** (aka the far jar) which includes lucee core and loader, java bundles, the base set of extensions, admin and docs
55+
- **Lucee.jar** (aka the fat jar) which includes Lucee core and loader, java bundles, the standard base set of extensions, admin and docs
5456
- **Lucee-light.jar** which includes the lucee core and loader, java bundles, admin and docs
55-
- **Lucee-zero.jar** which includes just the lucee core and loader, java bundles (since 6.0.0.492)
56-
- **lucee.lco** just the core lucee engine, which can be used to update an existing Lucee installation
57+
- **Lucee-zero.jar** which includes just the Lucee core and loader, java bundles (since 6.0.0.492)
58+
- **lucee.lco** just the core Lucee engine, which can be used to update an existing Lucee installation
5759

58-
## Customized Installs
60+
### Customized Installs
5961

60-
If you want to deploy a very targeted / customised install, start with Light or Zero and optionally add the extension(s) you want to use in the deploy folder, or set `LUCEE_EXTENSIONS` env var
62+
If you want to deploy a very targeted / customised install, start with Light or Zero and optionally add the extension(s) and `CFconfig.json` you required into the deploy folder, or set `LUCEE_EXTENSIONS` env var
6163

62-
## Warming up installs
64+
### Warming up installs
6365

64-
You can pre warm a lucee installation, by setting the env var `LUCEE_ENABLE_WARMUP` to true, when set, Lucee will deploy and then exit
66+
You can pre warm a lucee installation, by setting the env var `LUCEE_ENABLE_WARMUP` to true, when set, Lucee will deploy itself, including processing any files found in the `/deploy` folder and then exit
6567

66-
## Admin and Docs extensions
68+
### Admin and Docs extensions
6769

6870
You will see extensions, Lucee Admin and Lucee Docs, these simply install mappings to make them available. The admin is tightly coupled to the Lucee Version, so they aren't separately deployed
6971

70-
## AWS Lambdas / Serverless
72+
The Lucee Admin can be disabled by setting the env var `LUCEE_ADMIN_ENABLED=false` which is **recommended** for production/internet facing servers
73+
74+
### Console Logging
75+
76+
Since Lucee [6.2.0.310 / LDEV-3420](https://luceeserver.atlassian.net/browse/LDEV-3420), you can override the default logging configuration in `.CFconfig.json`, to redirect all logs to the console, which is very useful, especially with Docker.
77+
78+
Setting the env var `LUCEE_LOGGING_FORCE_APPENDER=console` globally overrides all logging configuration, to log out the console, using the existing configured log levels.
79+
80+
You can override the configured, per log file log levels using the env var `LUCEE_LOGGING_FORCE_LEVEL=INFO`
81+
82+
### Error Templates
83+
84+
By default, Lucee is configured to show detailed error messages, revealing server paths etc, which is great for developing.
85+
86+
This **should be disabled for production servers** by the following `.CFconfig.json` directives, or supply your own templates.
87+
88+
```
89+
{
90+
"errorGeneralTemplate": "/lucee/templates/error/error-public.cfm",
91+
"errorMissingTemplate": "/lucee/templates/error/error-public.cfm"
92+
}
93+
```
94+
95+
### Firewalled Servers
96+
97+
`.lco` updates either via the Lucee Admin update page, or by dropping into the `/deploy` folder, may require dynamically downloading any updated jar files from the update server. As such they may fail attempting to download the new files.
98+
99+
To update firewalled servers, or to upgrade without Lucee downloading bundles (which is slightly slower), do the following
100+
101+
1. Stop the server
102+
2. Download the (fat) lucee.jar (see below) from [https://download.lucee.org/](https://download.lucee.org/)
103+
3. Delete or change the file extension for the fat jar in the `lucee/lib` folder, i.e `5.4.3.2.jar`
104+
4. Copy the updated `lucee.jar` into that `lucee\lib` folder
105+
5. Start the server
106+
107+
### AWS Lambdas / Serverless
71108

72109
[Fuseless: Tools for running Serverless CFML Lambda Functions](https://fuseless.org/)

docs/recipes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Cache a Query for the current request in Lucee.
3636

3737
How to add per-application caches via Application.cfc in Lucee.
3838

39-
## [Check for changes in your configuration file automatically](/docs/recipes/check-for-changes.md)
39+
## [Untitled](/docs/recipes/check-for-changes.md)
4040

4141
Automatically check for changes in your configuration file with Lucee.
4242

docs/recipes/check-for-changes.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
{
3-
"title": "Check for changes",
3+
"title": "Automatic monitoring and applying CFConfig changes",
44
"id": "cookbook-check-for-changes",
55
"description": "Automatically check for changes in your configuration file with Lucee.",
66
"keywords": [
@@ -17,13 +17,21 @@
1717
}
1818
-->
1919

20-
# Check for changes in your configuration file automatically
20+
## Check for changes in your configuration file automatically
2121

2222
Lucee can automatically check for changes in your configuration files from the complete server or a single web context.
2323

2424
This is useful if you are doing scripted deploys and/or synchronization from, for example, a master instance to many slave instances of Lucee.
2525

26-
## Check for Changes in ALL the contexts
26+
### Check for Changes - CFconfig.json (6+)
27+
28+
```
29+
{
30+
"checkForChanges": true
31+
}
32+
```
33+
34+
### Check for Changes in ALL the contexts (pre 6.0)
2735

2836
To enable this for a whole Lucee server, find the Lucee server XML file in:
2937

@@ -37,13 +45,15 @@ Now it's simple to add the following:
3745

3846
<cfLuceeConfiguration hspw="xxx" salt="xx" check-for-changes="true" version="4.2">
3947

48+
### Restart Lucee
49+
4050
Now that you have made the change, you can either restart Lucee server from the administrator at:
4151

4252
http://localhost:8888/lucee/admin/server.cfm?action=services.restart
4353

44-
Or actually make any change in the Server Admin for the configuration to be picked up. This should now allow it to pick up any changes you have written to the lucee-server.xml file.
54+
Or actually make any change in the Server Admin for the configuration to be picked up. This should now allow it to pick up any changes you have written to the `CFconfig.json` / `lucee-server.xml` file.
4555

46-
## Check for changes in an individual context
56+
### Check for changes in an individual context
4757

4858
If you only want an individual context to check for changes, you can do the same configuration but you would have to go to:
4959

@@ -55,4 +65,4 @@ And add the same changes from above:
5565

5666
Lucee will now check for any changes in the Lucee configuration files every minute, and if there is a change, reload it and enable those changes.
5767

58-
A very handy little feature for those automated deployments!
68+
A very handy little feature for those automated deployments and local development!

docs/recipes/index.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@
134134
},
135135
{
136136
"file": "check-for-changes.md",
137-
"title": "Check for changes in your configuration file automatically",
137+
"title": "Untitled",
138138
"path": "/docs/recipes/check-for-changes.md",
139-
"hash": "1871271c6d6c1d999fc25d9bfcce2f6e",
139+
"hash": "2e272e2ddcbd6c86dcb419c053f395b1",
140140
"keywords": [
141141
"Configuration",
142142
"Check for changes",
@@ -279,7 +279,7 @@
279279
"file": "environment-variables-system-properties.md",
280280
"title": "Environment Variables / System Properties for Lucee",
281281
"path": "/docs/recipes/environment-variables-system-properties.md",
282-
"hash": "fe71bc9bf80a7ce10455be2cca4f42bf",
282+
"hash": "8ba721f6825e05601dd28869c5864bb6",
283283
"keywords": [
284284
"Environment",
285285
"Environment Variables",
@@ -1084,7 +1084,7 @@
10841084
"file": "supercharge-your-website.md",
10851085
"title": "Supercharge your website",
10861086
"path": "/docs/recipes/supercharge-your-website.md",
1087-
"hash": "16de007fd5dfccb78faba68082ad2b00",
1087+
"hash": "ee475a28a0d9793adf735f6b78b65092",
10881088
"keywords": [
10891089
"Supercharge website",
10901090
"Performance",

docs/recipes/supercharge-your-website.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@
1818

1919
# Supercharge your website
2020

21-
This document explains how you can improve the performance of your website in a very short time with Lucee.
21+
How to improve performance of your production Lucee website using never inspect templates.
22+
23+
## Background
24+
25+
By default, when a source file has changed, Lucee will detect that change and recompile it, before executing it.
26+
27+
This is great when you are developing, but it's usually not needed for production servers, as you can imagine, checking every files for changes, does slow down performance.
28+
29+
For production servers, if you know your server does not produce or change any source files, using Inspect Templates `NEVER` avoids that overhead.
2230

2331
## Example:
2432

@@ -27,20 +35,48 @@ This document explains how you can improve the performance of your website in a
2735
writeDump(now());
2836
```
2937

30-
Run the above index.cfm, and you get a timestamp. Whenever we call our file, Lucee checks once at every request if a file has changed or not (for files currently residing in the template cache). If a file has changed, Lucee recompiles it, and executes it. Checking the files at every request takes time. If you have a published server, and you know your server does not produce or change any files, you can simply avoid that check that happens all the time.
38+
Run the above `index.cfm`, and you get a timestamp. Now change that file and call it again, the changes are automatically picked up.
39+
40+
Whenever we call our file, by default, Lucee checks once at every request if a file has changed or not (for files currently residing in the template cache).
3141

32-
## Using Admin
42+
## Setting InspectTemplates to NEVER using the Lucee Admin
3343

3444
- Go to _Admin -> Performance/ Caching -> Inspect Templates (CFM/CFC) -> Never_
3545

3646
- The default is "Once", checking any requested files one time within each request. You should check "Never" to avoid the checking at every request.
3747

38-
- Change the index.cfm and run it again. No changes happen in the output because Lucee does not check if the file changed or not. Now, let's see the faster execution and less performance memory being used.
48+
- Change the `index.cfm` and run it again. No changes happen in the output because Lucee does not check if the file changed or not. Now, you'll see the faster execution and less performance memory being used.
3949

40-
- You can clear the cache by code using `pagePoolClear()`. This clears all template cache so that Lucee will check again if the template has changed. On the next request, Lucee will check initially for the file.
50+
- You can flag all cached templates to be checked once for changes using [[function-inspectTemplates]]. This is more efficent than [[function-pagepoolclear]] which clears the entire template cache, requiring every single template to be recompiled.
4151

4252
- Another option to clear the template cache is to use clear cache via the admin by clicking the button in _Admin -> Settings -> Performance/ Caching -> Page Pool Cache_.
4353

54+
Remember, the Lucee Admin is simply a GUI which edits `CFconfig.json`. It's written in CFML and if you want to do something the admin does, have a look at the source code.
55+
56+
## Setting InspectTemplates to NEVER using CFconfig.json
57+
58+
```
59+
{
60+
"inspectTemplate": "never"
61+
}
62+
```
63+
64+
The `inspectTemplates` setting can also be configured per mapping, by default mappings inherit the server default.
65+
66+
```
67+
{
68+
"mappings": {
69+
"/testbox": {
70+
"physical": "d:\\work\\TestBox",
71+
"primary": "physical",
72+
"topLevel": "true",
73+
"readOnly": "false",
74+
"inspectTemplate": "never"
75+
}
76+
}
77+
}
78+
```
79+
4480
## Footnotes
4581

4682
Here you can see these details on video also:

0 commit comments

Comments
 (0)