Forum Moderators: phranque

Message Too Old, No Replies

SSL on windows working for localhost but not domain name

         

bstubbs

3:29 pm on May 30, 2007 (gmt 0)

10+ Year Member



I'm a little stuck here. I have apache 2.0.59 and openSSL 0.9.8j working together well on XP (after a lot of messing around). But I have run into a weird problem, that I can't troubleshoot as no error message is added to the logs, and when I run apache from the command line, no error is outputed.

I created two self signed certs, one for localhost (server.crt) and one for for my domain (www.mydomain.com.crt). And added them both to conf/ssl directory, and made the appropriate changes to ssl.conf and httpd.conf.

So when I have

<VirtualHost *:443>
SSLEngine On
SSLCertificateFile conf/ssl/server.crt
SSLCertificateKeyFile conf/ssl/server.key
</VirtualHost>

Everything works great for localhost https.

But when I cahnge it to:
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile conf/ssl/www.mydomain.com.crt
SSLCertificateKeyFile conf/ssl/www.mydomain.com.key
</VirtualHost>

Apache fails to start. I made the change in both ssl.conf, and httpd.conf. I also tried to spell it incorrectly, just so I could get an error message telling me the cert doesn't exist, but when it's all there and existing apache fails with no message. Any idea on what the problem could be?

bstubbs

4:08 pm on May 30, 2007 (gmt 0)

10+ Year Member



OK, figured it out. I forgot to remove the private key. Apache on Windows does not support encrypted private keys.

So now it starts up. With a new problem. [domain.com...] works, and [domain.com...] comes up with "cannot display this page" error. But [localhost...] works just fine.

I'm at a loss here. I am getting a warning, but I'm not sure how to fix it.

The ServerName is www.domain.com, but the error states:
RSA server certificate CommonName (CN) `www.domain.com' does NOT match server name!?

bstubbs

4:26 pm on May 30, 2007 (gmt 0)

10+ Year Member



OK, once again, fixed that, now there are no errors or warnings in error.log.

So like a dummy, I fixed my problem. For some reason this slipped my mind... opening up port 443 on your firewall is always a good idea when wanting to use SSL :)

LifeinAsia

4:32 pm on May 30, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Glad we could help. :)

Oh, and welcome to Webmaster World!