Apache

Apache is a very common webserver which you can easily add to your Lando app by adding an entry to the services key in your app's .lando.yml.

Supported versions

Using patch versions

While Lando does not "officially" support specifying a patch version of this service you can try specifying one using overrides if you need to. This is not guaranteed to work so use at your own risk and take some care to make sure you are using a debian flavored patch version that also matches up with the major and minor versions of the service that we indicate above in "Supported versions".

Here are all the tags that are available for this service.

Here is an example of overriding the nginx service to use a patched version.

# The name of my app
name: patchversion

# Give me http://patchversion.lndo.site and https://patchversion.lndo.site
proxy:
  appserver:
    - patchversion.lndo.site

# Configure my services
services:

  # Create an nginx service called "appserver"
  appserver:

    # Set this to custom so we can override down the stream
    type: nginx:custom

    # SSL
    ssl: true

    # Override the image with the patch version
    # Note that this needs to be a correct namespace on the docker hub
    overrides:
      services:
        image: nginx:1.12.1

# Quick comamnd to check the nginx version
tooling:
  nginx:
    service: appserver

You can check out the full code for this example over here.

Example

# Name of my app
name: apache

# Give me http://apache.lndo.site and https://apache.lndo.site
proxy:
  html:
    - apache.lndo.site

# Build me an apache worthy of the internet
services:

  # You can name this key anything you want.
  html:

    # Use the latest version of apache.
    type: apache:2.2

    # Set this to true if you want to configure apache to also run over https
    ssl: true

    # Optionally specify a webroot if it is a subdirectory of the appRoot
    webroot: web

    # Optionally use a custom apache conf file
    # This should live in your app root and is relative to it
    # config:
      # server: config/httpd.conf

    # These are v3 docker compose file overrides. They allow you to provide very
    # precise fine tuning to your app
    # See: https://docs.docker.com/compose/compose-file/
    overrides:
      services:
        environment:
          STUFF: THINGS
        ports:
          - '8081:80'
        # Uncomment below to use a custom image or Dockerfile build location
        # image: pirog/myapache:2
        # run: .

You will need to rebuild your app with lando rebuild to apply the changes to this file. You can check out the full code for this example over here.

results matching ""

    No results matching ""