Multiple sites one document root


#1

Hi, I want to setup monitoring applications on my server, and to expose the over the HTTPS. Each application will have it’s own domain, and own certificate. But since I don’t really need to have website for them, I planed on making one document root for all of them e.g. /var/www/monitoring/index.html. Will there be any conflict if I issue certificates for different domains on the same webroot? Also, I plan to put basic autentication with apache over SSL port, will that conflict with automatic renewal of the certificate?


#2

Nope! That’s fine. :slightly_smiling_face:

Yes. Let’s Encrypt has to be able to access files in /.well-known/acme-challenge/xxxxxxxx without authentication.

It’s possible to exclude one directory from basic auth, but I’m not sure exactly how to do it in Apache.

Edit:

Let’s Encrypt validates over HTTP, though it will follow a redirect to HTTPS.

If you only configure auth on HTTPS, and don’t redirect /.well-known/acme-challenge/ requests to HTTPS, there won’t be a conflict.


#3

Thank you very much!!! I will put basic out only on HTTPS, but not over HTTP, and I do not plan to force redirect to HTTPS. I only need port 80 to obtain certificate, and for nothing more really.


#4

@pni Just a note on the basic auth. I believe with Apache you should be able to put a .htaccess file in /.well-known/acme-challenge/ (or perhaps even /.well-known/ ) with the override.

eg.

Satisfy Any
Allow from all


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.