Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
os:
- windows-2022
- ubuntu-24.04
- macos-13
- macos-15
node-version:
- '20'
steps:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Publish to NPM
on:
release:
types:
- published
- edited

- created
jobs:
deploy:
runs-on: ${{ matrix.os }}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

## v1.2.0 - [August 29, 2025](https://github.com/lando/apache/releases/tag/v1.2.0)

* Switched images to [bitnamilegacy](https://github.com/bitnami/containers/issues/83267) namspace
* Updated `apache:2` to `2.4.65`
* Updated `apache:2.4` to `2.4.65`

## v1.1.3 - [December 6, 2024](https://github.com/lando/apache/releases/tag/v1.1.3)

* Updated the version index.md to get Docuverse page to build correctly.
Expand Down
7 changes: 4 additions & 3 deletions builders/apache.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ module.exports = {
name: 'apache',
config: {
version: '2.4',
supported: ['2.4'],
supported: ['2', '2.4'],
pinPairs: {
'2.4': 'bitnami/apache:2.4.41-debian-10-r52',
'2': 'bitnamilegacy/apache:2.4.65-debian-12-r2',
'2.4': 'bitnamilegacy/apache:2.4.65-debian-12-r2',
},
patchesSupported: true,
confSrc: path.resolve(__dirname, '..', 'config'),
Expand Down Expand Up @@ -48,7 +49,7 @@ module.exports = {

// Build the default stuff here
const apache = {
image: `bitnami/apache:${options.version}`,
image: `bitnamilegacy/apache:${options.version}`,
command: '/launch.sh',
environment: options.environment,
user: 'root',
Expand Down
22 changes: 20 additions & 2 deletions config/launch.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/bash

# Errors and logz
set -e
set -eo pipefail

# Make tmp folder and make it writable if it doesnt exist
if [ ! -d "/opt/bitnami/apache/tmp" ]; then
mkdir -p "/opt/bitnami/apache/tmp"
fi
if [ -d "/opt/bitnami/apache/tmp" ]; then
chmod -R 777 "/opt/bitnami/apache/tmp"
fi

# Enable SSL if we have to
if [ -f "/etc/apache2/mods-available/ssl.load" ]; then
Expand All @@ -10,6 +17,17 @@ if [ -f "/etc/apache2/mods-available/ssl.load" ]; then
cp -rf /etc/apache2/mods-available/socache_shmcb* /etc/apache2/mods-enabled || true
fi

# if new bitnami certs are missing AND we have lando ones then copy the lando ones
if [ -f "/certs/cert.crt" ]; then
cp -rf /certs/cert.crt /certs/tls.crt
chown www-data /certs/tls.crt
chmod 0644 /certs/tls.crt

cp -rf /certs/cert.key /certs/tls.key
chown www-data /certs/tls.key
chmod 0640 /certs/tls.key
fi

# Detect and run the correct entrypoint script. THANKS BITNAMI!
if [ -f "/opt/bitnami/scripts/apache/entrypoint.sh" ]; then
/opt/bitnami/scripts/apache/entrypoint.sh /opt/bitnami/scripts/apache/run.sh
Expand Down
6 changes: 3 additions & 3 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: Learn how to configure the Lando Apache service.

# Configuration

Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/core/v3/lando.html) to get a good handle on how the magicks work.
Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/services/lando-3.html) to get a good handle on how the magicks work.

Also note that options, in addition to the [build steps](https://docs.lando.dev/core/v3/lando.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/lando.html#overrides) that are available to every service, are shown below:
Also note that options, in addition to the [build steps](https://docs.lando.dev/services/lando-3.html#build-steps) and [overrides](https://docs.lando.dev/services/lando-3.html#overrides) that are available to every service, are shown below:

```yaml
services:
Expand Down Expand Up @@ -45,7 +45,7 @@ Note that you can put your configuration files anywhere inside your application
```yaml
services:
myservice:
type: apache
type: apache:2.4
webroot: docroot
config:
server: config/httpd.conf
Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ At the very least you will need to have the following installed:

* [Lando 3.21.0+](https://docs.lando.dev/getting-started/installation.html) preferably installed [from source](https://docs.lando.dev/install/source.html).
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [Node 18](https://nodejs.org/dist/latest-v18.x/)
* [Node 20](https://nodejs.org/dist/latest-v20.x/)

## Installation

Expand Down
13 changes: 7 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ next: ./config.html

# Apache

[Apache](https://www.apache.org/) is a very common web server which you can easily add to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/services/lando.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3).
[Apache](https://www.apache.org/) is a very common web server which you can easily add to your Lando app by adding an entry to the [services](https://docs.lando.dev/services/lando-3.html) top-level config in your [Landofile](https://docs.lando.dev/landofile).

You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/services/lando.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3).
You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/services/lando-3.html) top-level config in your [Landofile](https://docs.lando.dev/landofile).

```yaml
services:
Expand All @@ -18,8 +18,9 @@ services:

## Supported versions

* **[2.4](https://hub.docker.com/r/bitnami/apache)** **(default)**
* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides)
* [2](https://hub.docker.com/r/bitnamilegacy/apache/tags?name=2.4.)
* [2.4](https://hub.docker.com/r/bitnamilegacy/apache/tags?name=2.4.)
* [custom](https://docs.lando.dev/services/lando-3.html#overrides)

## Patch versions

Expand All @@ -32,8 +33,8 @@ To use a patch version, you can do something as shown below:
```yaml
services:
myservice:
type: apache:2.4.62
type: apache:2.4.65
```

But make sure you use one of the available [patch tags](https://hub.docker.com/r/bitnami/apache/tags) for the underlying image we are using.
But make sure you use one of the available [patch tags](https://hub.docker.com/r/bitnamilegacy/apache/tags) for the underlying image we are using.

8 changes: 6 additions & 2 deletions examples/2.4/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ proxy:
- landoapache.lndo.site
services:
defaults:
type: apache
type: apache:2.4
patch:
type: apache:2.4.39
type: apache:2.4.41
curl:
api: 4
image: curlimages/curl:8.15.0
command: sleep infinity

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
Expand Down
12 changes: 6 additions & 6 deletions examples/2.4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ lando start
Run the following commands to validate things are rolling as they should.

```bash
# Should return 2.4.41 for the default version
lando exec defaults -- apachectl -V | grep 2.4.41
# Should return 2.4.65 for the default version
lando exec defaults -- apachectl -V | grep 2.4.65

# Should return 2.4.39 for the patch service
lando exec patch -- apachectl -V | grep 2.4.39
# Should return 2.4.41 for the patch service
lando exec patch -- apachectl -V | grep 2.4.41

# Should serve from the app root by default
lando exec defaults -- curl http://localhost | grep ROOTDIR
lando exec curl -- curl http://defaults | grep ROOTDIR

# Should only serve over http by default
lando exec defaults -- curl https://localhost || echo $? | grep 7
lando exec curl -- curl https://defaults || echo $? | grep 7
```

## Destroy tests
Expand Down
9 changes: 7 additions & 2 deletions examples/custom/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@ proxy:
- landoapachecustom.lndo.site
services:
custom:
type: apache
type: apache:2
webroot: web
ssl: true
config:
server: config/httpd.conf
vhosts: config/custom.conf
override:
type: apache
type: apache:2.4
webroot: web
overrides:
ports:
- target: 80
published: 8080
protocol: tcp
mode: host
curl:
api: 4
image: curlimages/curl:8.15.0
command: sleep infinity


# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
Expand Down
6 changes: 3 additions & 3 deletions examples/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ Run the following commands to validate things are rolling as they should.

```bash
# Should serve from webroot if specified
lando exec custom -- curl http://localhost | grep WEBDIR
lando exec curl -- curl http://custom | grep WEBDIR

# Should serve from https when specified
lando exec custom -- curl https://localhost | grep WEBDIR
lando exec curl -- curl https://custom | grep WEBDIR

# Should mount custom config to the correct locationz
lando exec custom -- cat /opt/bitnami/apache/conf/httpd.conf | grep LANDOHTTPD
lando exec custom -- cat /opt/bitnami/apache/conf/vhosts/lando.conf | grep LANDOCUSTOM

# Should use htaccess-lando if it exists
lando exec override -- curl -I http://landoapachecustom.lndo.site/folder1 | grep Location | grep http://landoapachecustom.lndo.site/folder2/
lando exec curl -- curl -I http://landoapachecustom.lndo.site/folder1 | grep Location | grep http://landoapachecustom.lndo.site/folder2/
```

## Destroy tests
Expand Down
11 changes: 9 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
skipPatterns = [ ".rss", ".gif", ".jpg" ]
checkExternal = true



# Sets our asset optimization
[build.processing.css]
bundle = true
Expand Down Expand Up @@ -44,6 +42,15 @@


# We need this so preview environments and the base site look ok on their own
[[redirects]]
from = "https://lando-apache.netlify.app"
to = "https://lando-apache.netlify.app/plugins/apache/index.html"
status = 301
force = true
[[redirects]]
from = "https://lando-apache.netlify.app/*"
to = "https://docs.lando.dev/:splat"
status = 301
[[redirects]]
from = "/"
to = "/plugins/apache"
Expand Down
Loading