You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's two ways to add this to your configuration:
Using YAML in config/moonshine.yml (or config/moonshine/STAGE.yml)
Using Ruby in app/manifests/application_manifest.
Here's an example using YAML. It uses the | to have a multi-line string with newlines preserved.
:passenger:
# other passenger settings go here
:vhost_extra: |
AddType application/x-mpegURL .m3u8
AddType video/MP2T .ts
For more complex examples, you may want to put this into a template, so you can dynamically generate the extra configuration. Here's an example where we store the extra configuration in a template, then configure moonshine to use it. In app/manifest/application_manifest.rb:
class ApplicationManifest < BaseManifest
configure :passenger => { :vhost_extra => template('app/manifests/templates/vhost_extras.erb') }
recipe :default_stack
# rest of your manifest
end
Anything in app/manifests/templates/vhost_extras.erb will now be rendered as a template into /etc/apache2/sites-enabled/APP.