Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple apps per instance #7

Closed
fullofcaffeine opened this issue Aug 12, 2012 · 1 comment
Closed

Multiple apps per instance #7

fullofcaffeine opened this issue Aug 12, 2012 · 1 comment

Comments

@fullofcaffeine
Copy link

Hi,

I'm sorry if this is a stupid question, but I'm just starting with Chef, and I'd like to deploy multiple apps to the same EC2 instance. The way I see it is that Chef would add a vhost for each app I have, and automatically set them up when the recipe is ran. Does this cookbook support such scenario?

Thanks a lot,

  • Marcelo.
@gerhard
Copy link
Contributor

gerhard commented Aug 29, 2012

Yes Marcelo, check the README. Snip:

:nginx => {
  :apps => {
    :app_ssl => {
      :server_name       => "app.com",
      :listen            => [443],
      :custom_directives => [
        "ssl on;",
        "return 301 https://www.$host$request_uri;"
      ]
    },
    :www_app => {
      :server_name       => "www.app.com",
      :listen            => ["80 default"],
      :custom_directives => [
        "return 301 https://$host$request_uri;"
      ]
    },
    :www_app_ssl => {
      :server_name => "www.app.com",
      :listen      => ["443 default"],
      :locations   => [
        {
          :path => "/",
          :directives => [
            # ...
          ]
        }
      ]
    }
  }
}

@gerhard gerhard closed this as completed Aug 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants