Hello forum,
I have the problem, how to protect a part of a website via ssl (certs with
client authentication).
I managed to protect the entire project but i don't find the correct
changes in certs and/or httpd.conf (virtual host section) where to limit
ssl-protection to certain subdirs of my project.
this is the virtual host section which makes protection for the entire
project:
================================================== =========================
httpd.conf snip
<VirtualHost 192.168.0.49:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/ssltest
ServerName ssltest
ErrorLog /var/log/apache/error.log
SSLEngine On
SSLVerifyClient require
SSLCertificateFile /etc/ssl/certPool/certs/(E-Mail Removed)
SSLCertificateKeyFile /etc/ssl/certPool/private/(E-Mail Removed)
SSLCACertificatePath /etc/ssl/certPool/ca/
SSLCACertificateFile /etc/ssl/certPool/ca/ca.crt
SSLCARevocationFile /etc/ssl/certPool/crl/ca.crl
SSLCARevocationPath /etc/ssl/certPool/crl/
SSLLog /var/log/apache/ssl.log
SSLLogLevel debug
</VirtualHost>
================================================== ==========================
and this was my idea how to protect only access to files located in subdocs:
================================================== ==========================
another httpd.conf snip
<VirtualHost 192.168.0.49:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/ssltest
ServerName ssltest
ErrorLog /var/log/apache/error.log
SSLEngine On
SSLVerifyClient none
SSLCertificateFile /etc/ssl/certPool/certs/(E-Mail Removed)
SSLCertificateKeyFile /etc/ssl/certPool/private/(E-Mail Removed)
SSLCACertificatePath /etc/ssl/certPool/ca/
SSLCACertificateFile /etc/ssl/certPool/ca/ca.crt
SSLCARevocationFile /etc/ssl/certPool/crl/ca.crl
SSLCARevocationPath /etc/ssl/certPool/crl/
SSLLog /var/log/apache/ssl.log
SSLLogLevel debug
<Directory subdocs>
SSLVerifyClient require
SSLVerifyDepth 1
</Directory>
</VirtualHost>
================================================== ==========================
I read about that the common name in clients certificate must be the server-
name from my virtual host definition! That was right (i failed to attempt
it different way :-) ), but do i have to change the common name from
ssltest to ssltest/subdocs if i just want files
located in subdocs to be ssl-protected?
What did i wrong?
Greetings, Markus Muessig
--
-----------------------------------------------------------------------------
UNIX IS NOT UNFRIENDLY, IT'S JUST PICKY ABOUT ITS FRIENDS
|