NOTE: This repo contains only the documentation for the private BoltsOps Pro repo code. Original file: https://github.com/boltopspro/httpd/blob/master/README.md The docs are publish so they are available for interested customers. For access to the source code, you must be a paying BoltOps Pro subscriber. If are interested, you can contact us at [email protected] or https://www.boltops.com
This lono configset will install, configure and run the httpd or apache2 webserver.
Lono configsets allow CloudFormation cfn-init configsets that are typically embedded in the template to be reusable. More info: Lono Configsets docs.
Add the configset to Gemfile:
gem "httpd", git: "https://github.com/boltopspro-docs/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")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>
EOLLearn more here: Configset Variables Docs