Issue
I have a web-app that runs on several country domains with the same code. Apache is configured with aliases. This works, except for the point of configuring individual SSL-certs:
ServerAlias *.server-at
ServerAlias *.server-ch
ServerAlias *.server-es
SSLEngine on
SSLCertificateFile /etc/ssl/certs/rex.server-de.crt
SSLCertificateKeyFile /etc/ssl/private/rex.server-de.key
Is it possible with apache2 to configure more than one SSL certificate inside a virtualhost container?
Solution
You can configure the individual certificates easily using a virtual host for each domain differentiating requests by ServerName
. For example
listen 443
<VirtualHost *:443>
ServerName rex.server.de:443
SSLEngine on
SSLCertificateFile " /etc/ssl/certs/rex.server-de.crt"
SSLCertificateKeyFile " /etc/ssl/certs/rex.server-de.key"
</VirtualHost>
<VirtualHost *:443>
ServerName rex.server.at:443
SSLEngine on
SSLCertificateFile " /etc/ssl/certs/rex.server-at.crt"
SSLCertificateKeyFile " /etc/ssl/certs/rex.server-at.key"
</VirtualHost>
Answered By - pedrofb Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.