lgromanowski / acme-plugin

:lock_with_ink_pen: ACME protocol plugin for Ruby on Rails applications
https://rubygems.org/gems/acme_plugin
MIT License
186 stars 30 forks source link

Installation instructions: how to create symlinks between multiple domains/subdomains #55

Open MincePie opened 8 years ago

MincePie commented 8 years ago

I'm trying to understand Part 2a of the installation instructions.

It says: Please bear in mind that if you would like to generate certificate for multiple domains than you have to create symlinks between sub-domains and main domain www directory. For example:

What does it mean?

1. Expected behaviour

I expect to see an example of how to follow the steps described.

2. Actual behavior

I can see a diagram although I don't know what it represents or how I'm supposed to complete this step of the instructions.

3. Steps to reproduce issue

See step 2a of the installation instructions

4. Your configuration (ruby, rails version, your Gemifile and Gemfile.lock files etc.)

Rails 5, Ruby 2.3.1., this gem is in the gem file

jasper-lyons commented 8 years ago

This is not something I would expect you to have to do. Rails does not depend on the directory layout of your app to respond to a request from a given domain.

How are you hosting this app? (heroku? aws? digital ocean?)

lgromanowski commented 8 years ago

Hi, I will try to explain - letsencrypt_plugin is a RoR engine mounted on given route in your application (lets call it "A", pinned to: domain-a.com). Each application has it's own LE plugin. When you configure multiple domains in LE plugin (lets say: domain-a.com, domain-b.com, domain-c.com) and run it from application "A" LE Cert server will try to access domain-a.com first and make challenge/response check on domain-a.com. Then it will try to do the same for domain-b.com, but we run LE plugin from application "A" (domain-a.com) and depending on configuration challenge/response tokens are stored in files/DB inside application "A". So either there will be symlinks described on wiki (or webserver is configured in the way that domain-b.com, and domain-c.com points to the same directory as domain-a.com), or challange/response tokens should be stored in the same DB, accessible for application "A","B", and "C".

MincePie commented 8 years ago

I am using heroku. I made a completely new app, with nothing it it other than LE plugin. It's on heroku. I outlined current issues on Issue 19. Thanks both.