nginx is a very common webserver and reverse proxy 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.


# The name of my app
name: nginx

# Give me and

# Configure my services

  # Create an nginx service called "appserver"

    # Use nginx version 1.12
    type: nginx:1.12

    # Optionally configure nginx to be able to also serve over https
    ssl: true

    # Optionally specify a webroot if your index.html is in a subdirectory
    webroot: www

    # Optionally use our own config files

      # Use custom nginx server config located in config/server.conf relative
      # to our app root
      server: config/server.conf

      # Use custom nginx http config located in config/http.conf relative
      # to our app root
      # http: config/http.conf

    # Pass in some docker compose overrides so we can map ports and get
    # more envvars
          THING: STUFF
        ports: ['8888:80']

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 ""