├── .travis.yml
├── etc
├── nginx
│ ├── sites-available
│ │ ├── default.conf
│ │ └── example.com.conf
│ ├── conf.d
│ │ └── lucee-global.conf
│ ├── lucee.conf
│ └── lucee-proxy.conf
├── tomcat7
│ ├── web.xml
│ ├── catalina.properties
│ └── server.xml
├── tomcat8
│ ├── web.xml
│ ├── catalina.properties
│ └── server.xml
└── tomcat9
│ ├── web.xml
│ ├── server.xml
│ └── catalina.properties
├── Dockerfile
├── scripts
├── 400-jvm.sh
├── 100-ubuntu-update.sh
├── 200-lucee.sh
├── 600-config.sh
├── 500-nginx.sh
└── 300-tomcat.sh
├── docker-compose.yml
├── install.sh
├── .github
└── workflows
│ └── ci.yml
├── update-lucee.sh
├── test.sh
├── README.md
└── LICENSE
/.travis.yml:
--------------------------------------------------------------------------------
1 | branches:
2 | only: master
3 | script:
4 | - docker-compose up
5 |
6 |
--------------------------------------------------------------------------------
/etc/nginx/sites-available/default.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80 default_server;
3 | root /web/default/wwwroot/;
4 | index index.html;
5 | }
6 |
--------------------------------------------------------------------------------
/etc/nginx/conf.d/lucee-global.conf:
--------------------------------------------------------------------------------
1 | #use a minimal server header
2 | server_tokens off;
3 |
4 | map $scheme $cgi_https {
5 | default "off";
6 | "https" "on";
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # FOR TESTING
2 | FROM ubuntu:20.04
3 | RUN apt-get update -y
4 | RUN apt-get upgrade -y
5 | RUN echo Testing
6 | COPY . /tmp/
7 | RUN chmod a+x /tmp/test.sh
8 | CMD /tmp/test.sh
9 |
--------------------------------------------------------------------------------
/scripts/400-jvm.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 |
4 | #No longer doing oracle jvm setup, using openjdk
5 |
6 |
7 | echo "Tomcat / Lucee Configuration Done, Starting Tomcat"
8 | echo `date`
9 | service tomcat9 start
10 |
11 | echo "Tomcat Status:"
12 | systemctl --no-pager status tomcat9
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "3"
2 |
3 | services:
4 | ubuntu-nginx-lucee:
5 | build: .
6 | ports:
7 | - "8099:8080"
8 | - "8180:80"
9 | environment:
10 | - IN_DOCKER=1
11 | - DEBUG_SLEEP=1
12 | - SKIP_UBUNTU_UPDATE=1
13 | - SKIP_UBUNTU_UPGRADE=1
--------------------------------------------------------------------------------
/etc/nginx/sites-available/example.com.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name example.com;
4 | root /web/example.com/wwwroot/;
5 |
6 | # Mod_cfml (Lucee) specific: add a unique ID for this server block.
7 | # For more info, see http://www.modcfml.org/index.cfm/install/web-server-components/nginx-all-os/
8 | set $lucee_context "example.com";
9 |
10 | include lucee.conf;
11 | }
12 |
--------------------------------------------------------------------------------
/scripts/100-ubuntu-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [[ $SKIP_UBUNTU_UPDATE ]];then
4 | echo "Skipping Ubuntu Update"
5 | else
6 | echo "Updating Ubuntu Software"
7 | apt-get update
8 | fi
9 |
10 | if [[ $SKIP_UBUNTU_UPGRADE ]];then
11 | echo "Skipping Ubuntu Upgrade"
12 | else
13 | echo "Upgrading Ubuntu Software"
14 | apt-get upgrade
15 | fi
16 |
17 | apt-get install unzip curl apt-transport-https gnupg
18 |
--------------------------------------------------------------------------------
/etc/nginx/lucee.conf:
--------------------------------------------------------------------------------
1 | #to enable Lucee for a server: include lucee.conf;
2 |
3 | #block the lucee-context except for certain ip
4 | location ~* /lucee/ {
5 | #allow 10.0.0.10;
6 | deny all;
7 | include lucee-proxy.conf;
8 | }
9 |
10 | location ~* /lucee-server {
11 | return 404;
12 | }
13 |
14 | #block/ignore CFIDE requests
15 | location ~* /CFIDE {
16 | return 404;
17 | }
18 |
19 | #block requests for Application.cfc/cfm
20 | location ~* Application.cf[mc]$ {
21 | return 404;
22 | }
23 |
24 | #match cfm or cfc files and proxy them off to tomcat
25 | #if you do not need SES urls like index.cfm/foo/bar
26 | #then use: (\.cfm|\.cfc)$ instead
27 | location ~* (\.cfm(\/|$)|\.cfc$) {
28 | include lucee-proxy.conf;
29 | }
30 |
31 | #set the default document to index.html or index.cfm
32 | index index.html index.cfm;
33 |
--------------------------------------------------------------------------------
/scripts/200-lucee.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | jar_url="https://release.lucee.org/rest/update/provider/loader/$LUCEE_VERSION"
4 | if [[ $LUCEE_LIGHT ]];then
5 | jar_url="https://release.lucee.org/rest/update/provider/light/$LUCEE_VERSION"
6 | fi
7 | jar_folder="lucee-$LUCEE_VERSION"
8 |
9 | echo "Installing Lucee"
10 | echo "Downloading Lucee " $LUCEE_VERSION
11 | mkdir /opt/lucee
12 | mkdir /opt/lucee/config
13 | mkdir /opt/lucee/config/server
14 | mkdir /opt/lucee/config/web
15 | mkdir /opt/lucee/$jar_folder
16 | curl --location -o /opt/lucee/$jar_folder/lucee.jar $jar_url
17 |
18 | if [ -f "/opt/lucee/$jar_folder/lucee.jar" ]; then
19 | echo "Download Complete"
20 | else
21 | echo "Download of Lucee Failed Exiting..."
22 | exit 1
23 | fi
24 |
25 | if [[ $LUCEE_JAR_SHA256 ]];then
26 | echo "Verifying SHA-256 checksum"
27 | if [[ $(sha256sum "/opt/lucee/$jar_folder/lucee.jar") =~ "$LUCEE_JAR_SHA256" ]]; then
28 | echo "Verified lucee.jar SHA-256: $LUCEE_JAR_SHA256"
29 | else
30 | echo "SHA-256 Checksum of lucee.jar verification failed"
31 | exit 1
32 | fi
33 | fi
34 |
35 | ln -s /opt/lucee/$jar_folder /opt/lucee/current
36 |
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #configuration options
4 | if [[ "$LUCEE_VERSION" == "" ]];then
5 | export LUCEE_VERSION="5.3.7.48"
6 | fi
7 |
8 | #if [[ "$LUCEE_LIGHT" == "" ]];then
9 | #export LUCEE_JAR_SHA256=""
10 | #fi
11 |
12 | if [[ "$JVM_MAX_HEAP_SIZE" == "" ]];then
13 | export JVM_MAX_HEAP_SIZE="512m"
14 | fi
15 |
16 |
17 | #root permission check
18 | if [ "$(whoami)" != "root" ]; then
19 | echo "Sorry, you need to run this script using sudo or as root."
20 | exit 1
21 | fi
22 |
23 | function separator {
24 | echo " "
25 | echo "------------------------------------------------"
26 | echo " "
27 | }
28 |
29 | #make sure scripts are runnable
30 | chown -R root scripts/*.sh
31 | chmod u+x scripts/*.sh
32 |
33 | #update ubuntu software
34 | ./scripts/100-ubuntu-update.sh
35 | separator
36 |
37 | #download lucee
38 | ./scripts/200-lucee.sh
39 | separator
40 |
41 | #install tomcat
42 | ./scripts/300-tomcat.sh
43 | separator
44 |
45 | #install jvm
46 | ./scripts/400-jvm.sh
47 | separator
48 |
49 | #install nginx
50 | ./scripts/500-nginx.sh
51 | separator
52 |
53 | #configure lucee
54 | ./scripts/600-config.sh
55 | separator
56 |
57 | echo "Setup Complete"
58 | separator
59 |
--------------------------------------------------------------------------------
/scripts/600-config.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #make request to server to generate context
4 | curl --verbose http://127.0.0.1:8080/lucee/admin/web.cfm
5 |
6 | #install commandbox
7 | echo "Installing CommandBox"
8 |
9 | curl -fsSl https://downloads.ortussolutions.com/debs/gpg | apt-key add -
10 | echo "deb https://downloads.ortussolutions.com/debs/noarch /" | tee -a /etc/apt/sources.list.d/commandbox.list
11 | apt-get update && apt-get install commandbox
12 |
13 | box install commandbox-cfconfig
14 |
15 | if [[ "$ADMIN_PASSWORD" == "" ]]; then
16 | echo "No ADMIN_PASSWORD set, generating a random password and storing it here: /root/lucee-admin-password.txt"
17 | touch /root/lucee-admin-password.txt
18 | chown root:root /root/lucee-admin-password.txt
19 | chmod 700 /root/lucee-admin-password.txt
20 | openssl rand -base64 64 | tr -d '\n\/\+=' > /root/lucee-admin-password.txt
21 | export ADMIN_PASSWORD=`cat /root/lucee-admin-password.txt`
22 | fi
23 |
24 | box cfconfig set adminPassword=$ADMIN_PASSWORD to=/opt/lucee/config/server/lucee-server/ toFormat=luceeServer@5
25 | box cfconfig set adminPasswordDefault=$ADMIN_PASSWORD to=/opt/lucee/config/server/lucee-server/ toFormat=luceeServer@5
26 |
27 | #restart to apply changes
28 | service tomcat9 restart
29 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | # This is a basic workflow to help you get started with Actions
2 |
3 | name: CI
4 |
5 | # Controls when the action will run.
6 | on:
7 | # Triggers the workflow on push or pull request events but only for the master branch
8 | push:
9 | branches: [ master ]
10 | # Allows you to run this workflow manually from the Actions tab
11 | workflow_dispatch:
12 |
13 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14 | jobs:
15 | # This workflow contains a single job called "build"
16 | build:
17 | # The type of runner that the job will run on
18 | runs-on: ubuntu-20.04
19 |
20 | # skip ubuntu upgrade because there is tons of stuff installed on the CI image
21 | env:
22 | SKIP_UBUNTU_UPGRADE: true
23 |
24 | # Steps represent a sequence of tasks that will be executed as part of the job
25 | steps:
26 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27 | - uses: actions/checkout@v2
28 |
29 | # Runs / tests install
30 | - name: Run / test install
31 | run: |
32 | cat /etc/debian_version
33 | sudo chmod a+x $GITHUB_WORKSPACE/test.sh
34 | sudo $GITHUB_WORKSPACE/test.sh
35 |
36 |
--------------------------------------------------------------------------------
/update-lucee.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | LUCEE_VERSION="5.x.y.z"
4 |
5 |
6 |
7 | jar_url="http://cdn.lucee.org/rest/update/provider/loader/$LUCEE_VERSION"
8 | jar_folder="lucee-$LUCEE_VERSION"
9 |
10 | if [ -f "/opt/lucee/$jar_folder/lucee.jar" ]; then
11 | echo "The folder /opt/lucee/$jar_folder already exists. Exiting..."
12 | exit 1
13 | fi
14 |
15 |
16 | echo "Installing Lucee"
17 | echo "Downloading Lucee " $LUCEE_VERSION
18 |
19 | mkdir /opt/lucee/$jar_folder
20 | curl --location -o /opt/lucee/lucee.zip $jar_url
21 |
22 |
23 | unzip /opt/lucee/lucee.zip -d /opt/lucee/$jar_folder
24 |
25 | if [ -f "/opt/lucee/$jar_folder/lucee.jar" ]; then
26 | echo "Download Complete"
27 | else
28 | echo "Download of Lucee Failed Exiting..."
29 | exit 1
30 | fi
31 |
32 | echo "Installing mod_cfml Valve for Automatic Virtual Host Configuration"
33 | if [ -f /opt/lucee/current/mod_cfml-valve_v1.1.05.jar ]; then
34 | cp /opt/lucee/current/mod_cfml-valve_v1.1.05.jar /opt/lucee/$jar_folder
35 | else
36 | curl --location -o /opt/lucee/$jar_folder/mod_cfml-valve_v1.1.05.jar https://raw.githubusercontent.com/utdream/mod_cfml/master/java/mod_cfml-valve_v1.1.05.jar
37 | fi
38 |
39 | ln -s /opt/lucee/$jar_folder /opt/lucee/current
40 |
41 | echo "Setting Permissions on Lucee Folders"
42 | chown -R tomcat:tomcat /opt/lucee
43 | chmod -R 750 /opt/lucee
44 |
--------------------------------------------------------------------------------
/etc/nginx/lucee-proxy.conf:
--------------------------------------------------------------------------------
1 | proxy_pass http://127.0.0.1:8080;
2 | #include standard proxy headers
3 | proxy_set_header Host $http_host;
4 | proxy_set_header X-Real-IP $remote_addr;
5 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
6 | proxy_set_header X-Forwarded-Proto $scheme;
7 | #populate the cgi.https variable with on or off based on map condition which must be specified in a http {} block
8 | proxy_set_header https $cgi_https;
9 |
10 | #add headers for mod_cfml to do its work
11 | proxy_set_header X-Tomcat-DocRoot $document_root;
12 | proxy_set_header X-ModCFML-SharedKey SHARED-KEY-HERE;
13 | # For more info on $lucee_context, see http://www.modcfml.org/index.cfm/install/web-server-components/nginx-all-os/
14 | if ($lucee_context = false) {
15 | set $lucee_context $document_root;
16 | }
17 | proxy_set_header X-Webserver-Context $lucee_context;
18 |
19 | # Enable path_info - http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo
20 | set $pathinfo "";
21 | # if the extension .cfm or .cfc is found, followed by a slash and optional extra
22 | if ($uri ~ "^(.+?\.cf[mc])(/.*)") {
23 | # remember the filepath without path_info
24 | set $script $1;
25 | set $pathinfo $2;
26 | # rewrite the url to match the filepath wthout path_info
27 | rewrite ^.+$ $script break;
28 | }
29 | # set the custom path_info header
30 | proxy_set_header XAJP-PATH-INFO $pathinfo;
31 |
--------------------------------------------------------------------------------
/scripts/500-nginx.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | web_root="/web"
3 |
4 | echo "Installing nginx"
5 | apt-get install nginx
6 | echo "Adding lucee nginx configuration files"
7 | cp etc/nginx/conf.d/lucee-global.conf /etc/nginx/conf.d/lucee-global.conf
8 | cp etc/nginx/lucee.conf /etc/nginx/lucee.conf
9 | cp etc/nginx/lucee-proxy.conf /etc/nginx/lucee-proxy.conf
10 |
11 | echo "Configuring modcfml shared secret in nginx"
12 | shared_secret=`cat /opt/lucee/modcfml-shared-key.txt`
13 | sed -i "s/SHARED-KEY-HERE/$shared_secret/g" /etc/nginx/lucee-proxy.conf
14 |
15 | echo "Creating web root and default sites here: " $web_root
16 | mkdir $web_root
17 | mkdir $web_root/default
18 | mkdir $web_root/default/wwwroot
19 | mkdir $web_root/example.com
20 | mkdir $web_root/example.com/wwwroot
21 |
22 | echo "Creating a default index.html"
23 | echo "
Hello
" > $web_root/default/wwwroot/index.html
24 |
25 |
26 |
27 | #add user tomcat to www-data group so it can read files
28 | usermod -aG www-data tomcat
29 |
30 | #set the web directory permissions
31 | chown -R root:www-data $web_root
32 | chmod -R 750 $web_root
33 |
34 |
35 | echo "Adding Default and Example Site to nginx"
36 | cp etc/nginx/sites-available/*.conf /etc/nginx/sites-available/
37 | echo "Removing nginx default site"
38 | rm /etc/nginx/sites-enabled/default
39 | echo "Adding our default site"
40 | ln -s /etc/nginx/sites-available/default.conf /etc/nginx/sites-enabled/default.conf
41 |
42 | if [[ $WHITELIST_IP ]];then
43 | echo "Granting $WHITELIST_IP access to /lucee"
44 | sed -i "s/#allow 10.0.0.10/allow $WHITELIST_IP/g" /etc/nginx/lucee.conf
45 | fi
46 |
47 |
48 | service nginx restart
49 |
--------------------------------------------------------------------------------
/test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cd "$(dirname "$0")"
4 |
5 | chmod a+x ./install.sh
6 |
7 |
8 | #assume yes to all apt-get commands
9 | echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf.d/90assumeyes
10 | export DEBIAN_FRONTEND=noninteractive
11 |
12 | ./install.sh
13 |
14 | if [[ $IN_DOCKER ]];then
15 | #systemd doesn't work in docker, so start manually
16 | export CATALINA_HOME=/usr/share/tomcat9
17 | export CATALINA_BASE=/var/lib/tomcat9
18 | export CATALINA_TMPDIR=/tmp
19 | export JAVA_OPTS=-Djava.awt.headless=true
20 | apt install sudo
21 | sudo --user=tomcat --preserve-env --set-home /usr/libexec/tomcat9/tomcat-start.sh &
22 |
23 | fi
24 |
25 | sleep 15
26 |
27 | http_code=$(curl --verbose -o /tmp/result.txt -w '%{http_code}' 'http://127.0.0.1:8080/lucee/admin/web.cfm';)
28 | echo "Finished with Status: $http_code "
29 | echo -e "\n-----\n"
30 | #output the result
31 | if [ -f "/tmp/result.txt" ]; then
32 | cat /tmp/result.txt
33 | else
34 | echo "Result file did not exist"
35 | http_code=0
36 | fi
37 |
38 |
39 | echo -e "\n-----\n"
40 |
41 | #test nginx setup
42 | cp /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
43 | service nginx restart
44 | echo "Lucee #server.lucee.version#" > /web/example.com/wwwroot/test.cfm
45 |
46 | #warmup hit
47 | curl --verbose --resolve 'example.com:80:127.0.0.1' http://example.com/test.cfm
48 |
49 | nginx_http_code=$(curl --verbose --resolve 'example.com:80:127.0.0.1' -o /tmp/result.txt -w '%{nginx_http_code}' 'http://example.com/test.cfm';)
50 | echo "Finished Nginx with Status: $nginx_http_code "
51 | echo -e "\n-----\n"
52 | #output the result
53 | if [ -f "/tmp/result.txt" ]; then
54 | cat /tmp/result.txt
55 | else
56 | echo "Nginx Result file did not exist"
57 | http_code=0
58 | fi
59 |
60 |
61 | echo -e "\n-----\n"
62 |
63 | find /opt/lucee/
64 |
65 | #output logs for debugging
66 | cat /var/log/nginx/*.log
67 | cat /var/log/tomcat9/*.log
68 |
69 | if [[ $DEBUG_SLEEP ]];then
70 | apt install vim
71 | echo "DEBUG SLEEPING: docker exec -it ID /bin/bash to debug container"
72 | echo "curl --verbose --resolve 'example.com:80:127.0.0.1' http://example.com/test.cfm"
73 | sleep 50000
74 | fi
75 |
76 | if [ "$http_code" -ne 200 ]; then
77 |
78 | #fail if status code is not 200
79 | exit 1
80 | fi
81 |
82 | if [ "$nginx_http_code" -ne 418 ]; then
83 |
84 | #fail if status code is not 418
85 | exit 1
86 | fi
87 |
--------------------------------------------------------------------------------
/scripts/300-tomcat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "Installing Tomcat 9"
4 | apt-get install tomcat9 openjdk-11-jdk-headless
5 |
6 | echo "Stopping Tomcat"
7 | echo `date`
8 | service tomcat9 stop
9 |
10 |
11 | echo "Configuring Tomcat"
12 |
13 | mkdir backup
14 | mkdir backup/etc
15 | mkdir backup/etc/tomcat9
16 | mkdir backup/etc/default
17 | #backup default tomcat web.xml
18 | cp /etc/tomcat9/web.xml backup/etc/tomcat9/web.xml-orig-backup
19 | #copy our web.xml to tomcat directory
20 | cp etc/tomcat9/web.xml /etc/tomcat9/
21 |
22 | #backup default server.xml
23 | cp /etc/tomcat9/server.xml backup/etc/tomcat9/server.xml-orig-backup
24 | #copy our server.xml to tomcat dir
25 | cp etc/tomcat9/server.xml /etc/tomcat9/
26 |
27 | #backup default catalina.properties
28 | cp /etc/tomcat9/catalina.properties backup/etc/tomcat9/catalina.properties-orig-backup
29 | #copy our catalina properties
30 | cp etc/tomcat9/catalina.properties /etc/tomcat9/
31 |
32 | cp /etc/default/tomcat9 backup/etc/default/tomcat9
33 |
34 | jarName="mod_cfml-valve_v1.1.11.jar"
35 | echo "Installing mod_cfml Valve for Automatic Virtual Host Configuration ($jarName)"
36 | if [ -f "lib/$jarName" ]; then
37 | cp "lib/$jarName" /opt/lucee/current/
38 | else
39 | curl --location -o "/opt/lucee/current/$jarName" "https://raw.githubusercontent.com/viviotech/mod_cfml/master/java/$jarName"
40 | fi
41 |
42 | MODCFML_JAR_SHA256="fa96cfb7d7b416acbfbb8e36e8df016c098ac47d723077547e812b4c4e2e394d"
43 | if [[ $(sha256sum "/opt/lucee/current/$jarName") =~ "$MODCFML_JAR_SHA256" ]]; then
44 | echo "Verified $jarName SHA-256: $MODCFML_JAR_SHA256"
45 | else
46 | echo "SHA-256 Checksum of $jarName verification failed"
47 | exit 1
48 | fi
49 |
50 | if [ ! -f /opt/lucee/modcfml-shared-key.txt ]; then
51 | echo "Generating Random Shared Secret..."
52 | openssl rand -base64 42 >> /opt/lucee/modcfml-shared-key.txt
53 | #clean out any base64 chars that might cause a problem
54 | sed -i "s/[\/\+=]//g" /opt/lucee/modcfml-shared-key.txt
55 | fi
56 |
57 | shared_secret=`cat /opt/lucee/modcfml-shared-key.txt`
58 |
59 | sed -i "s/SHARED-KEY-HERE/$shared_secret/g" /etc/tomcat9/server.xml
60 |
61 |
62 | echo "Setting Permissions on Lucee Folders"
63 | mkdir /var/lib/tomcat9/lucee-server
64 | chown -R tomcat:tomcat /var/lib/tomcat9/lucee-server
65 | chmod -R 750 /var/lib/tomcat9/lucee-server
66 | chown -R tomcat:tomcat /opt/lucee
67 | chmod -R 750 /opt/lucee
68 |
69 | echo "Setting JVM Max Heap Size to " $JVM_MAX_HEAP_SIZE
70 |
71 | #sed -i "s/-Xmx128m/-Xmx$JVM_MAX_HEAP_SIZE/g" /etc/default/tomcat9
72 | #-Dlucee.base.dir=/opt/lucee/config/server/
73 | echo "JAVA_OPTS=\"\${JAVA_OPTS} -Xmx$JVM_MAX_HEAP_SIZE -Dlucee.base.dir=/opt/lucee/config/server/\"" >> /etc/default/tomcat9
74 |
75 | echo "LUCEE_SERVER_DIR=\"/opt/lucee/config/server/\"" >> /etc/default/tomcat9
76 | echo "LUCEE_BASE_DIR=\"/opt/lucee/config/server/\"" >> /etc/default/tomcat9
77 |
78 | #In Ubuntu 20.04 necessary because ReadWritePaths is defined
79 | if [ ! -d "/etc/systemd/system/tomcat9.service.d" ] ; then
80 | mkdir /etc/systemd/system/tomcat9.service.d/
81 | fi
82 | echo "[Service]" > /etc/systemd/system/tomcat9.service.d/lucee.conf
83 | echo "ReadWritePaths=/opt/lucee/" >> /etc/systemd/system/tomcat9.service.d/lucee.conf
84 |
85 | systemctl daemon-reload && sleep 5
86 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ubuntu-nginx-lucee
2 | ==================
3 |
4 | [](https://github.com/foundeo/ubuntu-nginx-lucee/actions/workflows/ci.yml)
5 |
6 | A set of bash scripts for standing up a Lucee server using nginx and Tomcat on Ubuntu. Uses the
7 | Tomcat from the Ubuntu distribution so you can update Tomcat using `apt-get update tomcat9`
8 |
9 | ## Important Note
10 |
11 | >The master branch is now using Ubuntu 20.04 (and is currently a bit unstable). For Lucee 5 on Ubuntu 16.04 or 18.04 see the branch [lucee5-ubuntu18](https://github.com/foundeo/ubuntu-nginx-lucee/tree/lucee5-ubuntu18), for Lucee 4.5 see the [lucee45-ubuntu14](https://github.com/foundeo/ubuntu-nginx-lucee/tree/lucee45-ubuntu14) branch.
12 |
13 | Why would I use this instead of the offical Lucee installers?
14 | -------------------------------------------------------------
15 |
16 | * You want to run nginx as your web server
17 | * You want to update Tomcat via `apt-get`
18 |
19 | > Note: when this script was first created Tomcat was part of the `main` repository on Ubuntu, it is now part of `universal` which means it is community updated. I've noticed that it is not getting updated with security patches frequently like it did when it was part of `main`. This means you will still want to keep an eye on [Tomcat Security](https://tomcat.apache.org/security-9.html). You can use [HackMyCF](https://hackmycf.com/) (made by [foundeo](https://foundeo.com/)) to help you monitor when your server needs to be updated. Even if you use the default lucee installer, you will still need to keep an eye on the version of Tomcat you are running.
20 |
21 | What does it do?
22 | ----------------
23 |
24 | 1. **Updates Ubuntu** - simply runs `apt-get update` and `apt-get upgrade`
25 | 2. **Downloads Lucee** - uses curl to download lucee jars from BitBucket places jars in `/opt/lucee/current/`
26 | 3. **Installs & Configures Tomcat 8** - runs `apt-get install tomcat9` updates the `web.xml` `server.xml` and `catalina.properties` to configure Lucee servlets and mod_cfml Valve. (Tomcat/Lucee run on port 8080 by default).
27 | 4. **JVM** - in previous versions this step installed an Oracle JVM, but now we just use OpenJDK.
28 | 5. **Installs & Configures nginx** - runs `apt-get install nginx` to install nginx. Creates a web root directory. Creates a `lucee.config` file so you can just `include lucee.config` for any site that uses CFML
29 | 6. **Set Default Lucee Admin Password** - uses cfconfig to set the Lucee server context password and default web context password. If environment variable ADMIN_PASSWORD exists that is used, otherwise a random password is set.
30 |
31 | Take a look in the `scripts/` subfolder to see the script for each step.
32 |
33 | How do I run it?
34 | ----------------
35 |
36 | 1. **Download this repository** - `curl -Lo /root/ubuntu-nginx-lucee.tar.gz https://api.github.com/repos/foundeo/ubuntu-nginx-lucee/tarball/master`
37 | 2. **Extract repository** - `tar -xzvf /root/ubuntu-nginx-lucee.tar.gz`
38 | 3. **Configuration** - You can either Edit the `install.sh` and change any configuration options such as the Lucee Version or JVM version - or you can use environment variables (see below).
39 | 4. **Run install.sh** - make sure you are root or sudo and run `./install.sh` you may need to `chmod u+x install.sh` to give execute permissions to the script.
40 |
41 |
42 | Limitations / Known Issues
43 | --------------------------
44 |
45 | * The servlet definitions and mappings (located in `/etc/tomcat9/web.xml`) are slimmed down, so if you need things like REST web services, flash/flex remoting support see the [Railo docs for web.xml config](https://github.com/getrailo/railo/wiki/Configuration:web.xml)
46 | * The `/lucee/` uri is blocked in `/etc/nginx/lucee.conf` you must add in your ip address and restart nginx.
47 | * There is no uninstall option
48 | * This version of the script has been tested on Ubuntu 20.04 LTS only. See the branches of this repository for older versions of Ubuntu / Lucee.
49 |
50 | Environment Variables
51 | --------------------------
52 |
53 | The script can be configured with the following environment variables:
54 |
55 | * `LUCEE_VERSION` - sets the version of Lucee that it will attempt to install (eg 5.2.4.37).
56 | * `JVM_MAX_HEAP_SIZE` - sets the amount of memory that java / tomcat can use (eg 512m).
57 | * `ADMIN_PASSWORD` - sets the Lucee server context password and default web context password. If variable is not defined a random password is generated and set.
58 | * `WHITELIST_IP` - if specified this IP will be whitelisted to allow access to /lucee/
59 | * `LUCEE_JAR_SHA256` - if specified checks the sha256sum of the the downloaded lucee.jar
60 |
61 | Setting up a Virtual Host
62 | -------------------------
63 |
64 | By default nginx on Ubuntu looks in the folder `/etc/nginx/sites-enabled/` for configuration nginx files. To setup a site create a file in that folder (another technique you can use is to create the file in `/etc/nginx/sites-available/` and then create a symbolic link in sites-enabled to enable the site), for example `/etc/nginx/sites-enabled/me.example.com.conf` at a minimum it will look like this:
65 |
66 | server {
67 | listen 80;
68 | server_name me.example.com;
69 | root /web/me.example.com/wwwroot/;
70 | include lucee.conf;
71 | }
72 |
73 | You may also want to break logging for this site out into its own file, like this:
74 |
75 | server {
76 | listen 80;
77 | server_name me.example.com;
78 | root /web/me.example.com/wwwroot/;
79 | access_log /var/log/nginx/me.example.com.access.log;
80 | error_log /var/log/nginx/me.example.com.error.log;
81 | include lucee.conf;
82 | }
83 |
84 | If you don't need Lucee/CFML for a given site, simply omit the `include lucee.conf;` line, like this:
85 |
86 | server {
87 | listen 80;
88 | server_name img.example.com;
89 | root /web/img.example.com/wwwroot/;
90 | }
91 |
92 | Create the symbolic link in sites-enabled to enable the site:
93 |
94 | sudo ln -s /etc/nginx/sites-available/me.example.com.conf /etc/nginx/sites-enabled/
95 |
96 | After making changes you need to restart or reload nginx:
97 |
98 | sudo service nginx restart
99 |
100 | For more information on configuring nginx see the [nginx Wiki](http://wiki.nginx.org/Configuration)
101 |
102 |
103 | Thanks go to [Booking Boss](http://www.bookingboss.com/) for funding the initial work on this script.
104 |
--------------------------------------------------------------------------------
/etc/tomcat7/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 | default
13 | org.apache.catalina.servlets.DefaultServlet
14 |
15 | debug
16 | 0
17 |
18 |
19 | listings
20 | false
21 |
22 | 1
23 |
24 |
25 |
40 |
41 |
42 |
43 |
44 |
45 | Lucee CFML Engine
46 | CFMLServlet
47 | lucee.loader.servlet.CFMLServlet
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | lucee-server-directory
56 | /opt/lucee/config/server/
57 | Lucee Server configuration directory (for Server-wide configurations, settings, and libraries)
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | lucee-web-directory
69 | /opt/lucee/config/web/{web-context-label}/
70 | Lucee Web Directory (for Website-specific configurations, settings, and libraries)
71 |
72 |
73 | 1
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | default
85 | /
86 |
87 |
88 |
94 |
95 |
96 |
97 |
98 | CFMLServlet
99 | *.cfm
100 | *.cfml
101 | *.cfc
102 |
103 | /index.cfc/*
104 | /index.cfm/*
105 | /index.cfml/*
106 |
107 |
108 |
109 |
110 | 30
111 |
112 |
113 |
114 |
115 |
116 |
117 | pdf
118 | application/pdf
119 |
120 |
121 |
122 | png
123 | image/png
124 |
125 |
126 |
127 | zip
128 | application/zip
129 |
130 |
131 |
132 | gif
133 | image/gif
134 |
135 |
136 |
137 | jpeg
138 | image/jpeg
139 |
140 |
141 |
142 | jpg
143 | image/jpeg
144 |
145 |
146 |
147 | js
148 | application/javascript
149 |
150 |
151 |
152 | json
153 | application/json
154 |
155 |
156 |
157 | css
158 | text/css
159 |
160 |
161 |
162 | csv
163 | text/csv
164 |
165 |
166 |
167 |
168 |
169 |
170 | index.html
171 | index.cfm
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/etc/tomcat8/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 | default
13 | org.apache.catalina.servlets.DefaultServlet
14 |
15 | debug
16 | 0
17 |
18 |
19 | listings
20 | false
21 |
22 | 1
23 |
24 |
25 |
40 |
41 |
42 |
43 |
44 |
45 | Lucee CFML Engine
46 | CFMLServlet
47 | lucee.loader.servlet.CFMLServlet
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | lucee-server-directory
56 | /opt/lucee/config/server/
57 | Lucee Server configuration directory (for Server-wide configurations, settings, and libraries)
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | lucee-web-directory
69 | /opt/lucee/config/web/{web-context-label}/
70 | Lucee Web Directory (for Website-specific configurations, settings, and libraries)
71 |
72 |
73 | 1
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | default
85 | /
86 |
87 |
88 |
94 |
95 |
96 |
97 |
98 | CFMLServlet
99 | *.cfm
100 | *.cfml
101 | *.cfc
102 |
103 | /index.cfc/*
104 | /index.cfm/*
105 | /index.cfml/*
106 |
107 |
108 |
109 |
110 | 30
111 |
112 |
113 |
114 |
115 |
116 |
117 | pdf
118 | application/pdf
119 |
120 |
121 |
122 | png
123 | image/png
124 |
125 |
126 |
127 | zip
128 | application/zip
129 |
130 |
131 |
132 | gif
133 | image/gif
134 |
135 |
136 |
137 | jpeg
138 | image/jpeg
139 |
140 |
141 |
142 | jpg
143 | image/jpeg
144 |
145 |
146 |
147 | js
148 | application/javascript
149 |
150 |
151 |
152 | json
153 | application/json
154 |
155 |
156 |
157 | css
158 | text/css
159 |
160 |
161 |
162 | csv
163 | text/csv
164 |
165 |
166 |
167 |
168 |
169 |
170 | index.html
171 | index.cfm
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/etc/tomcat9/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 | default
13 | org.apache.catalina.servlets.DefaultServlet
14 |
15 | debug
16 | 0
17 |
18 |
19 | listings
20 | false
21 |
22 | 1
23 |
24 |
25 |
40 |
41 |
42 |
43 |
44 |
45 | Lucee CFML Engine
46 | CFMLServlet
47 | lucee.loader.servlet.CFMLServlet
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | lucee-server-directory
56 | /opt/lucee/config/server/
57 | Lucee Server configuration directory (for Server-wide configurations, settings, and libraries)
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | lucee-web-directory
69 | /opt/lucee/config/web/{web-context-label}/
70 | Lucee Web Directory (for Website-specific configurations, settings, and libraries)
71 |
72 |
73 | 1
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | default
85 | /
86 |
87 |
88 |
94 |
95 |
96 |
97 |
98 | CFMLServlet
99 | *.cfm
100 | *.cfml
101 | *.cfc
102 |
103 | /index.cfc/*
104 | /index.cfm/*
105 | /index.cfml/*
106 |
107 |
108 |
109 |
110 | 30
111 |
112 |
113 |
114 |
115 |
116 |
117 | pdf
118 | application/pdf
119 |
120 |
121 |
122 | png
123 | image/png
124 |
125 |
126 |
127 | zip
128 | application/zip
129 |
130 |
131 |
132 | gif
133 | image/gif
134 |
135 |
136 |
137 | jpeg
138 | image/jpeg
139 |
140 |
141 |
142 | jpg
143 | image/jpeg
144 |
145 |
146 |
147 | js
148 | application/javascript
149 |
150 |
151 |
152 | json
153 | application/json
154 |
155 |
156 |
157 | css
158 | text/css
159 |
160 |
161 |
162 | csv
163 | text/csv
164 |
165 |
166 |
167 |
168 |
169 |
170 | index.html
171 | index.cfm
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/etc/tomcat7/catalina.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | #
17 | # List of comma-separated packages that start with or equal this string
18 | # will cause a security exception to be thrown when
19 | # passed to checkPackageAccess unless the
20 | # corresponding RuntimePermission ("accessClassInPackage."+package) has
21 | # been granted.
22 | package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
23 | #
24 | # List of comma-separated packages that start with or equal this string
25 | # will cause a security exception to be thrown when
26 | # passed to checkPackageDefinition unless the
27 | # corresponding RuntimePermission ("defineClassInPackage."+package) has
28 | # been granted.
29 | #
30 | # by default, no packages are restricted for definition, and none of
31 | # the class loaders supplied with the JDK call checkPackageDefinition.
32 | #
33 | package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
34 |
35 | #
36 | #
37 | # List of comma-separated paths defining the contents of the "common"
38 | # classloader. Prefixes should be used to define what is the repository type.
39 | # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
40 | # If left as blank,the JVM system loader will be used as Catalina's "common"
41 | # loader.
42 | # Examples:
43 | # "foo": Add this folder as a class repository
44 | # "foo/*.jar": Add all the JARs of the specified folder as class
45 | # repositories
46 | # "foo/bar.jar": Add bar.jar as a class repository
47 | common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/common/classes,${catalina.home}/common/*.jar,/opt/lucee/current/*.jar
48 |
49 | #
50 | # List of comma-separated paths defining the contents of the "server"
51 | # classloader. Prefixes should be used to define what is the repository type.
52 | # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
53 | # If left as blank, the "common" loader will be used as Catalina's "server"
54 | # loader.
55 | # Examples:
56 | # "foo": Add this folder as a class repository
57 | # "foo/*.jar": Add all the JARs of the specified folder as class
58 | # repositories
59 | # "foo/bar.jar": Add bar.jar as a class repository
60 | server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar
61 |
62 | #
63 | # List of comma-separated paths defining the contents of the "shared"
64 | # classloader. Prefixes should be used to define what is the repository type.
65 | # Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
66 | # the "common" loader will be used as Catalina's "shared" loader.
67 | # Examples:
68 | # "foo": Add this folder as a class repository
69 | # "foo/*.jar": Add all the JARs of the specified folder as class
70 | # repositories
71 | # "foo/bar.jar": Add bar.jar as a class repository
72 | # Please note that for single jars, e.g. bar.jar, you need the URL form
73 | # starting with file:.
74 | shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar
75 |
76 | # List of JAR files that should not be scanned using the JarScanner
77 | # functionality. This is typically used to scan JARs for configuration
78 | # information. JARs that do not contain such information may be excluded from
79 | # the scan to speed up the scanning process. This is the default list. JARs on
80 | # this list are excluded from all scans. Scan specific lists (to exclude JARs
81 | # from individual scans) follow this. The list must be a comma separated list of
82 | # JAR file names.
83 | # The JARs listed below include:
84 | # - Tomcat Bootstrap JARs
85 | # - Tomcat API JARs
86 | # - Catalina JARs
87 | # - Jasper JARs
88 | # - Tomcat JARs
89 | # - Common non-Tomcat JARs
90 | # - Test JARs (JUnit, Cobertura and dependencies)
91 | tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
92 | bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
93 | annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\
94 | catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
95 | jasper.jar,jasper-el.jar,ecj-*.jar,\
96 | tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
97 | tomcat-jni.jar,tomcat-spdy.jar,\
98 | tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
99 | tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
100 | tomcat-jdbc.jar,\
101 | tools.jar,\
102 | commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
103 | commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
104 | commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
105 | commons-math*.jar,commons-pool*.jar,\
106 | jstl.jar,\
107 | geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
108 | ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
109 | jmx-tools.jar,jta*.jar,log4j.jar,log4j-1*.jar,mail*.jar,slf4j*.jar,\
110 | xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
111 | junit.jar,junit-*.jar,hamcrest*.jar,org.hamcrest*.jar,ant-launcher.jar,\
112 | cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\
113 | jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\
114 | xom-*.jar
115 |
116 | # Additional JARs (over and above the default JARs listed above) to skip when
117 | # scanning for Servlet 3.0 pluggability features. These features include web
118 | # fragments, annotations, SCIs and classes that match @HandlesTypes. The list
119 | # must be a comma separated list of JAR file names.
120 | org.apache.catalina.startup.ContextConfig.jarsToSkip=
121 |
122 | # Additional JARs (over and above the default JARs listed above) to skip when
123 | # scanning for TLDs. The list must be a comma separated list of JAR file names.
124 | org.apache.catalina.startup.TldConfig.jarsToSkip=tomcat7-websocket.jar
125 |
126 | # Default list of JAR files that should be scanned that overrides the default
127 | # jarsToSkip list above. This is typically used to include a specific JAR that
128 | # has been excluded by a broad file name pattern in the jarsToSkip list.
129 | # The list of JARs to scan may be over-ridden at a Context level for individual
130 | # scan types by configuring a JarScanner with a nested JarScanFilter.
131 | tomcat.util.scan.StandardJarScanFilter.jarsToScan=log4j-core*.jar,log4j-taglib*.jar
132 |
133 | #
134 | # String cache configuration.
135 | tomcat.util.buf.StringCache.byte.enabled=true
136 | #tomcat.util.buf.StringCache.char.enabled=true
137 | #tomcat.util.buf.StringCache.trainThreshold=500000
138 | #tomcat.util.buf.StringCache.cacheSize=5000
139 |
--------------------------------------------------------------------------------
/etc/tomcat7/server.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
22 |
23 |
26 |
27 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
39 |
40 |
43 |
48 |
49 |
50 |
55 |
56 |
57 |
58 |
62 |
63 |
64 |
71 |
75 |
76 |
82 |
86 |
91 |
92 |
93 |
96 |
97 |
98 |
103 |
104 |
107 |
108 |
109 |
112 |
115 |
116 |
118 |
119 |
123 |
125 |
126 |
127 |
131 |
132 |
134 |
135 |
137 |
140 |
141 |
144 |
147 |
148 |
149 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
--------------------------------------------------------------------------------
/etc/tomcat9/server.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
22 |
23 |
24 |
27 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
41 |
46 |
47 |
48 |
53 |
54 |
55 |
56 |
60 |
61 |
62 |
69 |
72 |
73 |
79 |
84 |
89 |
90 |
91 |
92 |
93 |
94 |
99 |
100 |
103 |
104 |
105 |
108 |
111 |
112 |
114 |
115 |
119 |
121 |
122 |
123 |
128 |
129 |
131 |
132 |
134 |
137 |
138 |
141 |
144 |
145 |
146 |
154 |
155 |
156 |
157 |
158 |
159 |
--------------------------------------------------------------------------------
/etc/tomcat8/catalina.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | #
17 | # List of comma-separated packages that start with or equal this string
18 | # will cause a security exception to be thrown when
19 | # passed to checkPackageAccess unless the
20 | # corresponding RuntimePermission ("accessClassInPackage."+package) has
21 | # been granted.
22 | package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.
23 | #
24 | # List of comma-separated packages that start with or equal this string
25 | # will cause a security exception to be thrown when
26 | # passed to checkPackageDefinition unless the
27 | # corresponding RuntimePermission ("defineClassInPackage."+package) has
28 | # been granted.
29 | #
30 | # by default, no packages are restricted for definition, and none of
31 | # the class loaders supplied with the JDK call checkPackageDefinition.
32 | #
33 | package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
34 | org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
35 |
36 | #
37 | #
38 | # List of comma-separated paths defining the contents of the "common"
39 | # classloader. Prefixes should be used to define what is the repository type.
40 | # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
41 | # If left as blank,the JVM system loader will be used as Catalina's "common"
42 | # loader.
43 | # Examples:
44 | # "foo": Add this folder as a class repository
45 | # "foo/*.jar": Add all the JARs of the specified folder as class
46 | # repositories
47 | # "foo/bar.jar": Add bar.jar as a class repository
48 | #
49 | # Note: Values are enclosed in double quotes ("...") in case either the
50 | # ${catalina.base} path or the ${catalina.home} path contains a comma.
51 | # Because double quotes are used for quoting, the double quote character
52 | # may not appear in a path.
53 | common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar","/opt/lucee/current/*.jar"
54 |
55 | #
56 | # List of comma-separated paths defining the contents of the "server"
57 | # classloader. Prefixes should be used to define what is the repository type.
58 | # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
59 | # If left as blank, the "common" loader will be used as Catalina's "server"
60 | # loader.
61 | # Examples:
62 | # "foo": Add this folder as a class repository
63 | # "foo/*.jar": Add all the JARs of the specified folder as class
64 | # repositories
65 | # "foo/bar.jar": Add bar.jar as a class repository
66 | #
67 | # Note: Values may be enclosed in double quotes ("...") in case either the
68 | # ${catalina.base} path or the ${catalina.home} path contains a comma.
69 | # Because double quotes are used for quoting, the double quote character
70 | # may not appear in a path.
71 | server.loader=
72 |
73 | #
74 | # List of comma-separated paths defining the contents of the "shared"
75 | # classloader. Prefixes should be used to define what is the repository type.
76 | # Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
77 | # the "common" loader will be used as Catalina's "shared" loader.
78 | # Examples:
79 | # "foo": Add this folder as a class repository
80 | # "foo/*.jar": Add all the JARs of the specified folder as class
81 | # repositories
82 | # "foo/bar.jar": Add bar.jar as a class repository
83 | # Please note that for single jars, e.g. bar.jar, you need the URL form
84 | # starting with file:.
85 | #
86 | # Note: Values may be enclosed in double quotes ("...") in case either the
87 | # ${catalina.base} path or the ${catalina.home} path contains a comma.
88 | # Because double quotes are used for quoting, the double quote character
89 | # may not appear in a path.
90 | shared.loader=
91 |
92 | # Default list of JAR files that should not be scanned using the JarScanner
93 | # functionality. This is typically used to scan JARs for configuration
94 | # information. JARs that do not contain such information may be excluded from
95 | # the scan to speed up the scanning process. This is the default list. JARs on
96 | # this list are excluded from all scans. The list must be a comma separated list
97 | # of JAR file names.
98 | # The list of JARs to skip may be over-ridden at a Context level for individual
99 | # scan types by configuring a JarScanner with a nested JarScanFilter.
100 | # The JARs listed below include:
101 | # - Tomcat Bootstrap JARs
102 | # - Tomcat API JARs
103 | # - Catalina JARs
104 | # - Jasper JARs
105 | # - Tomcat JARs
106 | # - Common non-Tomcat JARs
107 | # - Test JARs (JUnit, Cobertura and dependencies)
108 | tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
109 | bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
110 | annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\
111 | catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-storeconfig.jar,\
112 | catalina-tribes.jar,\
113 | jasper.jar,jasper-el.jar,ecj-*.jar,\
114 | tomcat-api.jar,tomcat-util.jar,tomcat-util-scan.jar,tomcat-coyote.jar,\
115 | tomcat-dbcp.jar,tomcat-jni.jar,tomcat-websocket.jar,\
116 | tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
117 | tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
118 | tomcat-jdbc.jar,\
119 | tools.jar,\
120 | commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
121 | commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
122 | commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
123 | commons-math*.jar,commons-pool*.jar,\
124 | jstl.jar,taglibs-standard-spec-*.jar,\
125 | geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
126 | ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
127 | jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\
128 | xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
129 | junit.jar,junit-*.jar,ant-launcher.jar,\
130 | cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\
131 | jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\
132 | xom-*.jar
133 |
134 | # Default list of JAR files that should be scanned that overrides the default
135 | # jarsToSkip list above. This is typically used to include a specific JAR that
136 | # has been excluded by a broad file name pattern in the jarsToSkip list.
137 | # The list of JARs to scan may be over-ridden at a Context level for individual
138 | # scan types by configuring a JarScanner with a nested JarScanFilter.
139 | tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
140 | log4j-web*.jar,log4j-taglib*.jar,log4javascript*.jar,slf4j-taglib*.jar
141 |
142 | # String cache configuration.
143 | tomcat.util.buf.StringCache.byte.enabled=true
144 | #tomcat.util.buf.StringCache.char.enabled=true
145 | #tomcat.util.buf.StringCache.trainThreshold=500000
146 | #tomcat.util.buf.StringCache.cacheSize=5000
147 |
--------------------------------------------------------------------------------
/etc/tomcat8/server.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
22 |
23 |
24 |
27 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
41 |
46 |
47 |
48 |
53 |
54 |
55 |
56 |
60 |
61 |
62 |
69 |
72 |
73 |
79 |
84 |
89 |
90 |
91 |
92 |
93 |
94 |
99 |
100 |
103 |
104 |
105 |
108 |
111 |
112 |
114 |
115 |
119 |
121 |
122 |
123 |
128 |
129 |
131 |
132 |
134 |
137 |
138 |
141 |
144 |
145 |
146 |
154 |
155 |
156 |
157 |
158 |
159 |
--------------------------------------------------------------------------------
/etc/tomcat9/catalina.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | #
17 | # List of comma-separated packages that start with or equal this string
18 | # will cause a security exception to be thrown when
19 | # passed to checkPackageAccess unless the
20 | # corresponding RuntimePermission ("accessClassInPackage."+package) has
21 | # been granted.
22 | package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.
23 | #
24 | # List of comma-separated packages that start with or equal this string
25 | # will cause a security exception to be thrown when
26 | # passed to checkPackageDefinition unless the
27 | # corresponding RuntimePermission ("defineClassInPackage."+package) has
28 | # been granted.
29 | #
30 | # by default, no packages are restricted for definition, and none of
31 | # the class loaders supplied with the JDK call checkPackageDefinition.
32 | #
33 | package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
34 | org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
35 |
36 | #
37 | #
38 | # List of comma-separated paths defining the contents of the "common"
39 | # classloader. Prefixes should be used to define what is the repository type.
40 | # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
41 | # If left as blank,the JVM system loader will be used as Catalina's "common"
42 | # loader.
43 | # Examples:
44 | # "foo": Add this folder as a class repository
45 | # "foo/*.jar": Add all the JARs of the specified folder as class
46 | # repositories
47 | # "foo/bar.jar": Add bar.jar as a class repository
48 | #
49 | # Note: Values are enclosed in double quotes ("...") in case either the
50 | # ${catalina.base} path or the ${catalina.home} path contains a comma.
51 | # Because double quotes are used for quoting, the double quote character
52 | # may not appear in a path.
53 | common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar","/opt/lucee/current/*.jar"
54 |
55 | #
56 | # List of comma-separated paths defining the contents of the "server"
57 | # classloader. Prefixes should be used to define what is the repository type.
58 | # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
59 | # If left as blank, the "common" loader will be used as Catalina's "server"
60 | # loader.
61 | # Examples:
62 | # "foo": Add this folder as a class repository
63 | # "foo/*.jar": Add all the JARs of the specified folder as class
64 | # repositories
65 | # "foo/bar.jar": Add bar.jar as a class repository
66 | #
67 | # Note: Values may be enclosed in double quotes ("...") in case either the
68 | # ${catalina.base} path or the ${catalina.home} path contains a comma.
69 | # Because double quotes are used for quoting, the double quote character
70 | # may not appear in a path.
71 | server.loader=
72 |
73 | #
74 | # List of comma-separated paths defining the contents of the "shared"
75 | # classloader. Prefixes should be used to define what is the repository type.
76 | # Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
77 | # the "common" loader will be used as Catalina's "shared" loader.
78 | # Examples:
79 | # "foo": Add this folder as a class repository
80 | # "foo/*.jar": Add all the JARs of the specified folder as class
81 | # repositories
82 | # "foo/bar.jar": Add bar.jar as a class repository
83 | # Please note that for single jars, e.g. bar.jar, you need the URL form
84 | # starting with file:.
85 | #
86 | # Note: Values may be enclosed in double quotes ("...") in case either the
87 | # ${catalina.base} path or the ${catalina.home} path contains a comma.
88 | # Because double quotes are used for quoting, the double quote character
89 | # may not appear in a path.
90 | shared.loader=
91 |
92 | # Default list of JAR files that should not be scanned using the JarScanner
93 | # functionality. This is typically used to scan JARs for configuration
94 | # information. JARs that do not contain such information may be excluded from
95 | # the scan to speed up the scanning process. This is the default list. JARs on
96 | # this list are excluded from all scans. The list must be a comma separated list
97 | # of JAR file names.
98 | # The list of JARs to skip may be over-ridden at a Context level for individual
99 | # scan types by configuring a JarScanner with a nested JarScanFilter.
100 | # The JARs listed below include:
101 | # - Tomcat Bootstrap JARs
102 | # - Tomcat API JARs
103 | # - Catalina JARs
104 | # - Jasper JARs
105 | # - Tomcat JARs
106 | # - Common non-Tomcat JARs
107 | # - Test JARs (JUnit, Cobertura and dependencies)
108 | tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
109 | annotations-api.jar,\
110 | ant-junit*.jar,\
111 | ant-launcher.jar,\
112 | ant.jar,\
113 | asm-*.jar,\
114 | aspectj*.jar,\
115 | bootstrap.jar,\
116 | catalina-ant.jar,\
117 | catalina-ha.jar,\
118 | catalina-ssi.jar,\
119 | catalina-storeconfig.jar,\
120 | catalina-tribes.jar,\
121 | catalina.jar,\
122 | cglib-*.jar,\
123 | cobertura-*.jar,\
124 | commons-beanutils*.jar,\
125 | commons-codec*.jar,\
126 | commons-collections*.jar,\
127 | commons-daemon.jar,\
128 | commons-dbcp*.jar,\
129 | commons-digester*.jar,\
130 | commons-fileupload*.jar,\
131 | commons-httpclient*.jar,\
132 | commons-io*.jar,\
133 | commons-lang*.jar,\
134 | commons-logging*.jar,\
135 | commons-math*.jar,\
136 | commons-pool*.jar,\
137 | dom4j-*.jar,\
138 | easymock-*.jar,\
139 | ecj-*.jar,\
140 | el-api.jar,\
141 | geronimo-spec-jaxrpc*.jar,\
142 | h2*.jar,\
143 | hamcrest-*.jar,\
144 | hibernate*.jar,\
145 | httpclient*.jar,\
146 | icu4j-*.jar,\
147 | jasper-el.jar,\
148 | jasper.jar,\
149 | jaspic-api.jar,\
150 | jaxb-*.jar,\
151 | jaxen-*.jar,\
152 | jdom-*.jar,\
153 | jetty-*.jar,\
154 | jmx-tools.jar,\
155 | jmx.jar,\
156 | jsp-api.jar,\
157 | jstl.jar,\
158 | jta*.jar,\
159 | junit-*.jar,\
160 | junit.jar,\
161 | log4j*.jar,\
162 | mail*.jar,\
163 | objenesis-*.jar,\
164 | oraclepki.jar,\
165 | oro-*.jar,\
166 | servlet-api-*.jar,\
167 | servlet-api.jar,\
168 | slf4j*.jar,\
169 | taglibs-standard-spec-*.jar,\
170 | tagsoup-*.jar,\
171 | tomcat-api.jar,\
172 | tomcat-coyote.jar,\
173 | tomcat-dbcp.jar,\
174 | tomcat-i18n-*.jar,\
175 | tomcat-jdbc.jar,\
176 | tomcat-jni.jar,\
177 | tomcat-juli-adapters.jar,\
178 | tomcat-juli.jar,\
179 | tomcat-util-scan.jar,\
180 | tomcat-util.jar,\
181 | tomcat-websocket.jar,\
182 | tools.jar,\
183 | websocket-api.jar,\
184 | wsdl4j*.jar,\
185 | xercesImpl.jar,\
186 | xml-apis.jar,\
187 | xmlParserAPIs-*.jar,\
188 | xmlParserAPIs.jar,\
189 | xom-*.jar
190 |
191 | # Default list of JAR files that should be scanned that overrides the default
192 | # jarsToSkip list above. This is typically used to include a specific JAR that
193 | # has been excluded by a broad file name pattern in the jarsToSkip list.
194 | # The list of JARs to scan may be over-ridden at a Context level for individual
195 | # scan types by configuring a JarScanner with a nested JarScanFilter.
196 | tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
197 | log4j-taglib*.jar,\
198 | log4j-web*.jar,\
199 | log4javascript*.jar,\
200 | slf4j-taglib*.jar
201 |
202 | # String cache configuration.
203 | tomcat.util.buf.StringCache.byte.enabled=true
204 | #tomcat.util.buf.StringCache.char.enabled=true
205 | #tomcat.util.buf.StringCache.trainThreshold=500000
206 | #tomcat.util.buf.StringCache.cacheSize=5000
207 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------