Skip to content

httpd configset: install, configure, and run httpd apache2 webserver

License

Notifications You must be signed in to change notification settings

boltops-pro/httpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configset: httpd

CodeBuild

BoltOps Badge

This lono configset will install, configure and run the httpd or apache2 webserver.

What are lono configsets?

Lono configsets allow CloudFormation cfn-init configsets that are typically embedded in the template to be reusable. More info: Lono Configsets docs.

Usage

Add the configset to Gemfile:

gem "httpd", git: "https://github.com/boltopspro/httpd"

Use configset to enable it for a lono blueprint. Here's a example with a blueprint named demo:

configs/demo/configsets/base.rb:

configset("httpd", resource: "Instance")

This adds the configset to the resource with the logical id Instance in your CloudFormation template. The configset is added to the Resources[].Metadata.AWS::CloudFormation::Init attribute of the Instance resource.

Here's an another example adding to a LaunchConfig resource:

configset("httpd", resource: "LaunchConfig")

And another example adding to a LaunchTemplate resource:

configset("httpd", resource: "LaunchTemplate")

Set the html content

You can set the html content of the created /var/www/html/index.html file with configset variables. Example:

configs/demo/configsets/httpd/variables.rb:

@html =<<~EOL
<h1>My test page</h1>
<p>My test content. Set with configs/demo/configsets/httpd/variables.rb.</p>
EOL

Learn more here: Configset Variables Docs

About

httpd configset: install, configure, and run httpd apache2 webserver

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages