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
technicalpickles edited this page May 1, 2011
·
1 revision
Moonshine's default_stack recipe comes with one virtual host already setup for you, but you may find yourself wanting to add your own. Reviewing the code for how the passenger vhost is setup is a great way to learn to do this for other virtual hosts.
First, we start with a new template in app/manifests/templates/example.vhost.erb:
# app/manifests/templates/example.vhost.erb
<VirtualHost *:80>
# interesting stuff goes here
</VirtualHost>
Then in app/manifests/application_manifest.rb we're going to create a new recipe. It will use this template to create a new site in /etc/apache2/sites-available and then enable it.