0

I'm looking for the correct root to use for Jetbrains Hub, UpSource & YouTrack with LetsEncrypt. I have all three of these located in their own folder in /opt/

With certbot, I am using the following command to generate a certificate:

certbot certonly --webroot -w <root> -d hub.example.com

I assumed the root would be /opt/hub/apps/hub/web yet I get an error when certbot is trying to locate the certificate in the .well-known folder indicating the root is incorrect.

I'd rather not create a "fake" root in /var/www/jetbrains and keep everything in their own folder if possible.

(I could not use the tags jetbrains-hub youtrack & upsource as they do not exist and I do not have enough reputation, if anyone would be so kind, thank you).

4
  • Are you not using a web server with these applications?! Dec 13, 2016 at 18:48
  • @MichaelHampton I have setup all three with a proxy in nginx in according with the Jetbrains documentation. Example: jetbrains.com/help/upsource/3.5/proxy-configuration.html
    – Yates
    Dec 13, 2016 at 18:52
  • In that case you can just add an appropriate location in the nginx configuration. Dec 13, 2016 at 19:06
  • @MichaelHampton sadly this would require me to push a request for the .well-known folder to another root if I'm not mistaken.
    – Yates
    Dec 13, 2016 at 19:51

1 Answer 1

0

You say you'd rather not create a "fake" root, but it vastly simplifies management and it works across everything, regardless of application or domain, so I'm going to ignore that request for this answer.

Include

location /.well-known/acme-challenge {
    alias /var/www/letsencrypt;
    index index.html;
    location = /.well-known/acme-challenge {
    try_files $uri $uri/ =444;
}

in the server block for each application and tell certbot to use /var/www/letsencrypt as the webroot. I have this in a template I include in dozens of server{} blocks for various domains and applications. You can leave off the index if you want, but I like to put "Go away." index.html files everywhere just to make sure auto-indexing doesn't happen.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .