You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/00.home/homepage.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,14 @@ To find out more about getting involved as a developer with Lucee, checkout our
20
20
21
21
**New!** We have added a whole series of detailed [[Recipes]] showing you how to take advantage of the wide range of features in Lucee.
22
22
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
+
23
31
## Lucee 6.2
24
32
25
33
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.
Copy file name to clipboardExpand all lines: docs/04.guides/12.deploying-lucee-server-apps/04.locking-down-lucee-server/page.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,19 @@ Make sure the WEB-INF directory is locked down. You will need to configure your
14
14
15
15
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.
### Ensure All Administrators for All Contexts Have Passwords Assigned and Use Captcha ###
18
25
19
26
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
20
27
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
+
21
30
### Reduce Request Timeouts as Low as Possible ###
22
31
23
32
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.
Copy file name to clipboardExpand all lines: docs/04.guides/12.deploying-lucee-server-apps/page.md
+63-26Lines changed: 63 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ related:
7
7
- running-lucee-system-properties
8
8
- locking-down-lucee-server
9
9
- relocating-web-inf
10
+
- cookbook-check-for-changes
11
+
- config
10
12
forceSortOrder: '22'
11
13
---
12
14
@@ -16,57 +18,92 @@ forceSortOrder: '22'
16
18
17
19
[[locking-down-your-lucee-stack]]
18
20
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
20
22
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 .
22
24
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.
24
26
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.
26
28
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
28
30
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]].
30
34
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
32
36
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).
34
38
35
39
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.
36
40
37
-
##Firewalled Servers
41
+
### .lco - Lucee core updates
38
42
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.
40
44
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.
42
46
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.
48
50
49
-
## Lucee Distributions
51
+
###Lucee Distributions
50
52
51
53
available from [https://download.lucee.org/](https://download.lucee.org/)
52
54
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
54
56
-**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
57
59
58
-
## Customized Installs
60
+
###Customized Installs
59
61
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
61
63
62
-
## Warming up installs
64
+
###Warming up installs
63
65
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
65
67
66
-
## Admin and Docs extensions
68
+
###Admin and Docs extensions
67
69
68
70
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
69
71
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.
`.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
71
108
72
109
[Fuseless: Tools for running Serverless CFML Lambda Functions](https://fuseless.org/)
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.
45
55
46
-
## Check for changes in an individual context
56
+
###Check for changes in an individual context
47
57
48
58
If you only want an individual context to check for changes, you can do the same configuration but you would have to go to:
49
59
@@ -55,4 +65,4 @@ And add the same changes from above:
55
65
56
66
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.
57
67
58
-
A very handy little feature for those automated deployments!
68
+
A very handy little feature for those automated deployments and local development!
Copy file name to clipboardExpand all lines: docs/recipes/supercharge-your-website.md
+41-5Lines changed: 41 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,15 @@
18
18
19
19
# Supercharge your website
20
20
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.
22
30
23
31
## Example:
24
32
@@ -27,20 +35,48 @@ This document explains how you can improve the performance of your website in a
27
35
writeDump(now());
28
36
```
29
37
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).
31
41
32
-
## Using Admin
42
+
## Setting InspectTemplates to NEVER using the Lucee Admin
33
43
34
44
- Go to _Admin -> Performance/ Caching -> Inspect Templates (CFM/CFC) -> Never_
35
45
36
46
- The default is "Once", checking any requested files one time within each request. You should check "Never" to avoid the checking at every request.
37
47
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.
39
49
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.
41
51
42
52
- 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_.
43
53
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.
0 commit comments