LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache, https & certificates per directory (https://www.linuxquestions.org/questions/linux-newbie-8/apache-https-and-certificates-per-directory-846021/)

jonaskellens 11-23-2010 07:43 AM

Apache, https & certificates per directory
 
Hello,

I was wondering if it is possible to have different certificates for different directories in a https-directory ?

So what I want is that for a specific directory a specific TLS-certificate is needed by the http-client to be authorized to the directory.

Directory /var/www/html/secure/1 needs a certificate A.
Directory /var/www/html/secure/2 need a different certificate B.

So I have 1 CA, which signs the other certificates of the specific directory. The http-client gets the certificate A or certificate B (to be authenticated for secure/1 of secure/2)

bathory 11-23-2010 08:53 AM

Hi,

What you can do is to setup 2 ssl virtual servers in apache, using /var/www/html/secure/1, /var/www/html/secure/2 and certA, certB respectively.
Note that this can be done with recent versions of openssl (0.9.8f or later) and apache (2.2.12 or later). For more details take a look here

Regards

jonaskellens 11-23-2010 09:19 AM

To be very concrete :

I want to use different directories in which reside configuration files for Snom VoIP-phones. Configuration files for Snom phones of one customer may not be used by other customers.

Therefore I give each customer its own certificate to authenticate his Snom phones. These authenticated Snom VoIP-phones can then pull there configuration from the https-server.

Don't know whether this SNI is supported though...

bathory 11-23-2010 04:40 PM

So you mean that the clients are those VoIP phones? I don't know either if they support TLS with the SNI extension, but I don't think so.
Anyway you can ask the manufacturer to confirm if the do or they do not support SNI.

Regards

jonaskellens 11-25-2010 08:46 AM

Quote:

Originally Posted by bathory (Post 4168647)
So you mean that the clients are those VoIP phones?

Question asked to Snom.

What is the alternative ?! Is there another way to have multiple https-directories accessible with a different certificate ?

bathory 11-25-2010 11:52 AM

Quote:

What is the alternative ?! Is there another way to have multiple https-directories accessible with a different certificate ?
I'm afraid I cannot think some another way for this. I.e. to access through web different directories using https with different certificates depending on the directory requested.


All times are GMT -5. The time now is 02:41 AM.