Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache 2 with SSL - getting started problem

Status
Not open for further replies.

queuebert

IS-IT--Management
Feb 18, 2003
28
JP
Hi all,

I am trying to implement SSL on my Apache2 configuration. I took all the steps but I apparently did something wrong and am having difficulty tracking it down.

Facts:
- openssl is downloaded and when I run "apache2ctl startssl", it gives me no errors.
- I know it is passing the <IfDefine SSL> test because if I put jibberish within that section, it tells me about it whereas it used to not tell me.
- I have generated temporary .csr, .crt, and .key files, all of which Apache 2 appears to be reading.
- I have listen.conf set with NameVirtualHost *, and a virtual host of 10.0.2.121:443, although I have tried many combinations of this.
- I have port 443 open on my hardware firewall

Problem:
When I try to visit Firefox tells me "The Connection to secure.host.com has terminated unexpectedly. Some data may have been transferred." Internet Explorer tells me "You are about to view data over a secure connection blah blah blah" and then when I click OK, it takes me to the built-in "Server not found" page. It is not even getting to the point of being able to log anything.

If anyone could give me any suggestions or advice, I would greatly appreciate it!

Thanks,
Sean Noble
 
Thank you for the reply. I have both a Listen 80 and Listen 443 directive in listen.conf, which is included into httpd.conf.

This is my ssl-global.conf:

<IfDefine SSL>
<IfDefine !NOSSL>
<IfModule mod_ssl.c>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl

SSLPassPhraseDialog builtin

SSLSessionCache shmcb:/var/lib/apache2/ssl_scache
SSLSessionCacheTimeout 600

SSLMutex sem

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
</IfDefine>
</IfDefine>

Other than that, the only other ssl-related directive I've got is the virtual host:

<IfDefine SSL>
<VirtualHost 10.0.2.121:443>
ServerAdmin secure@narratus.com
DocumentRoot /var/ ServerName secure.narratus.com
SSLEngine on
SSLCertificateFile /etc/apache2/ssl.crt/narratus.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/narratus.pem
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog /var/ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
</IfDefine>
 
Nevermind, I got it working. Thanks again for your interest in helping!
 
Just for completeness in case someone has a similar problem and is searching the site for a similar answer, what did you change?


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Basically my problem was that my NameVirtualHost was set to the IP address of my router, not the local machine. This worked fine until I introduced SSL into the picture. I wouldn't have set it that way intentionally, but configurations of the machine changed several times and Apache's configuration wasn't evolved to where it needed to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top