I have set up 2 virtual hosts on my server each of which uses it's own key and certificate (obviously!). Problem is, the second one (webmail) seems to be using the same certificate as the first one ( Here is my httpd.conf:
ServerType standalone
ServerAdmin webmaster@domainname.com
User www
Group www
Port 443
Listen 443
PidFile /usr/local/apache-ssl/logs/httpd.pid
AddHandler cgi-script .pl
NameVirtualHost *
<VirtualHost *>
ServerName SSLEngine on
SSLVerifyClient 0
SSLVerifyDepth 10
SSLCertificateKeyFile /usr/local/apache-ssl/conf/ssl.key/SSLCertificateFile /usr/local/apache-ssl/conf/ssl.crt/DocumentRoot /web
DirectoryIndex index.html index.htm welcome.html welcome.htm index.xml
ScriptAlias /cgi-bin/ "/web/cgi-bin/"
TransferLog /usr/local/apache-ssl/logs/access.log
SSLLogFile /usr/local/apache-ssl/logs/ssl.log
ErrorLog /usr/local/apache-ssl/logs/error.log
</VirtualHost>
<VirtualHost *>
ServerName webmail.domainname.com
DocumentRoot /neomail
DirectoryIndex index.html
SSLEngine on
SSLVerifyClient 0
SSLVerifyDepth 10
SSLCertificateKeyFile /usr/local/apache-ssl/conf/ssl.key/webmail.domainname.com.key
SSLCertificateFile /usr/local/apache-ssl/conf/ssl.crt/webmail.domainname.com.crt
ScriptAlias /cgi-bin/ "/neomail/cgi-bin/"
TransferLog /usr/local/apache-ssl/logs/access.log
SSLLogFile /usr/local/apache-ssl/logs/ssl.log
ErrorLog /usr/local/apache-ssl/logs/error.log
</VirtualHost>
Does anyone know why both hosts are using the same certificate? They point to the correct DocumentRoots.
P.S. I tried setting up as the main server (not as a VirtualHost) but this caused both domains to point to webmail's documentroot.
P.P.S both the hosts need to be SSL enabled.
C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
ServerType standalone
ServerAdmin webmaster@domainname.com
User www
Group www
Port 443
Listen 443
PidFile /usr/local/apache-ssl/logs/httpd.pid
AddHandler cgi-script .pl
NameVirtualHost *
<VirtualHost *>
ServerName SSLEngine on
SSLVerifyClient 0
SSLVerifyDepth 10
SSLCertificateKeyFile /usr/local/apache-ssl/conf/ssl.key/SSLCertificateFile /usr/local/apache-ssl/conf/ssl.crt/DocumentRoot /web
DirectoryIndex index.html index.htm welcome.html welcome.htm index.xml
ScriptAlias /cgi-bin/ "/web/cgi-bin/"
TransferLog /usr/local/apache-ssl/logs/access.log
SSLLogFile /usr/local/apache-ssl/logs/ssl.log
ErrorLog /usr/local/apache-ssl/logs/error.log
</VirtualHost>
<VirtualHost *>
ServerName webmail.domainname.com
DocumentRoot /neomail
DirectoryIndex index.html
SSLEngine on
SSLVerifyClient 0
SSLVerifyDepth 10
SSLCertificateKeyFile /usr/local/apache-ssl/conf/ssl.key/webmail.domainname.com.key
SSLCertificateFile /usr/local/apache-ssl/conf/ssl.crt/webmail.domainname.com.crt
ScriptAlias /cgi-bin/ "/neomail/cgi-bin/"
TransferLog /usr/local/apache-ssl/logs/access.log
SSLLogFile /usr/local/apache-ssl/logs/ssl.log
ErrorLog /usr/local/apache-ssl/logs/error.log
</VirtualHost>
Does anyone know why both hosts are using the same certificate? They point to the correct DocumentRoots.
P.S. I tried setting up as the main server (not as a VirtualHost) but this caused both domains to point to webmail's documentroot.
P.P.S both the hosts need to be SSL enabled.
C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!