All Projects → foundeo → ubuntu-nginx-lucee

foundeo / ubuntu-nginx-lucee

Licence: Apache-2.0 license
Script for standing up a Lucee server using nginx and Tomcat on Ubuntu

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ubuntu-nginx-lucee

core
FarCry Core: a web app framework for the ColdFusion language (supporting Lucee & Adobe ColdFusion engines). An ideal platform for building bespoke or tailor made solutions.
Stars: ✭ 34 (-58.54%)
Mutual labels:  lucee, cfml
cfml-tags-to-cfscript
A collection of examples defining how to convert CFML code blocks written in tags to CFScript.
Stars: ✭ 30 (-63.41%)
Mutual labels:  lucee, cfml
lucee-docs
Source and build scripts for Lucee's documentation.
Stars: ✭ 39 (-52.44%)
Mutual labels:  lucee, cfml
cfwheels-example-app
A CFWheels 2.x App with user management, role based permissions and password resets
Stars: ✭ 17 (-79.27%)
Mutual labels:  lucee, cfml
lucee-performance-analyzer
Performance Analyzer plugin for Lucee, to be used in the Lucee Admin or Standalone.
Stars: ✭ 29 (-64.63%)
Mutual labels:  lucee, cfml
Tomcat-Webmin-Module
Apache Tomcat Plugin for Webmin
Stars: ✭ 19 (-76.83%)
Mutual labels:  tomcat
godofwar
GodOfWar - Malicious Java WAR builder with built-in payloads
Stars: ✭ 118 (+43.9%)
Mutual labels:  tomcat
spring-boot-fat-jar-jsp-sample
No description or website provided.
Stars: ✭ 24 (-70.73%)
Mutual labels:  tomcat
standalone-docker-sailpoint-iiq
A simple way to deploy SailPoint's IdentityIQ into a series of docker containers mimicking the core components of most development environments allowing organizations to get new development team members up on their baseline code in minutes.
Stars: ✭ 33 (-59.76%)
Mutual labels:  tomcat
docker-tomcat-mysql
Docker image for tomcat+mysql, orchestrated with supervisord
Stars: ✭ 26 (-68.29%)
Mutual labels:  tomcat
WebBug
Java编写的Web漏洞靶场
Stars: ✭ 45 (-45.12%)
Mutual labels:  tomcat
ketabhome-shopping-cart-admin-panel
🛒 📙 📔 ketabhome is an online java book store application with admin panel based on servlet, with database c3p0 connector
Stars: ✭ 19 (-76.83%)
Mutual labels:  tomcat
Java-CS-Record
记录准备春招实习过程中,学习与复习的知识(模块化整理,非面试题速成)。注:暂停更新,后续请移步博客
Stars: ✭ 73 (-10.98%)
Mutual labels:  tomcat
bitnami-docker-tomcat
Bitnami Docker Image for Tomcat
Stars: ✭ 44 (-46.34%)
Mutual labels:  tomcat
docker-geoserver
A basic docker geoserver image with JAI and marlin renderer running on tomcat
Stars: ✭ 17 (-79.27%)
Mutual labels:  tomcat
gretty
Advanced gradle plugin for running web-apps on jetty and tomcat.
Stars: ✭ 116 (+41.46%)
Mutual labels:  tomcat
devops-ninja
This is a collection of some very useful command-line commands that eases the life of a DevOps Engineer.
Stars: ✭ 27 (-67.07%)
Mutual labels:  tomcat
inventory-hub-java-on-azure
Sample Inventory Hub App using Serverless and Event-driven Java - on Azure with Spring Boot, Tomcat, Functions, Event Hub and Cosmos DB
Stars: ✭ 18 (-78.05%)
Mutual labels:  tomcat
smeagol-galore
A git-based wiki featuring markdown, a WYSIWYG Editor, PlantUML, and much more
Stars: ✭ 21 (-74.39%)
Mutual labels:  tomcat
docker-pega-web-ready
Docker project for generating a tomcat docker image for Pega
Stars: ✭ 46 (-43.9%)
Mutual labels:  tomcat

ubuntu-nginx-lucee

CI

A set of bash scripts for standing up a Lucee server using nginx and Tomcat on Ubuntu. Uses the Tomcat from the Ubuntu distribution so you can update Tomcat using apt-get update tomcat9

Important Note

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, for Lucee 4.5 see the lucee45-ubuntu14 branch.

Why would I use this instead of the offical Lucee installers?

  • You want to run nginx as your web server
  • You want to update Tomcat via apt-get

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. You can use HackMyCF (made by foundeo) 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.

What does it do?

  1. Updates Ubuntu - simply runs apt-get update and apt-get upgrade
  2. Downloads Lucee - uses curl to download lucee jars from BitBucket places jars in /opt/lucee/current/
  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).
  4. JVM - in previous versions this step installed an Oracle JVM, but now we just use OpenJDK.
  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
  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.

Take a look in the scripts/ subfolder to see the script for each step.

How do I run it?

  1. Download this repository - curl -Lo /root/ubuntu-nginx-lucee.tar.gz https://api.github.com/repos/foundeo/ubuntu-nginx-lucee/tarball/master
  2. Extract repository - tar -xzvf /root/ubuntu-nginx-lucee.tar.gz
  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).
  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.

Limitations / Known Issues

  • 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
  • The /lucee/ uri is blocked in /etc/nginx/lucee.conf you must add in your ip address and restart nginx.
  • There is no uninstall option
  • 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.

Environment Variables

The script can be configured with the following environment variables:

  • LUCEE_VERSION - sets the version of Lucee that it will attempt to install (eg 5.2.4.37).
  • JVM_MAX_HEAP_SIZE - sets the amount of memory that java / tomcat can use (eg 512m).
  • 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.
  • WHITELIST_IP - if specified this IP will be whitelisted to allow access to /lucee/
  • LUCEE_JAR_SHA256 - if specified checks the sha256sum of the the downloaded lucee.jar

Setting up a Virtual Host

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:

server {
	listen 80;
	server_name me.example.com;
	root /web/me.example.com/wwwroot/;
	include lucee.conf;
}

You may also want to break logging for this site out into its own file, like this:

server {
	listen 80;
	server_name me.example.com;
	root /web/me.example.com/wwwroot/;
	access_log /var/log/nginx/me.example.com.access.log;
	error_log /var/log/nginx/me.example.com.error.log;
	include lucee.conf;
}

If you don't need Lucee/CFML for a given site, simply omit the include lucee.conf; line, like this:

server {
	listen 80;
	server_name img.example.com;
	root /web/img.example.com/wwwroot/;
}

Create the symbolic link in sites-enabled to enable the site:

sudo ln -s /etc/nginx/sites-available/me.example.com.conf /etc/nginx/sites-enabled/

After making changes you need to restart or reload nginx:

sudo service nginx restart

For more information on configuring nginx see the nginx Wiki

Thanks go to Booking Boss for funding the initial work on this script.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].