logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How do I add SSL to a non-SSL apache build?
Author
DiMono



Joined: 16 Mar 2007
Posts: 5
Location: Just north of Toronto

PostPosted: Fri 16 Mar '07 19:43    Post subject: How do I add SSL to a non-SSL apache build? Reply with quote

I have a problem. I installed Apache 2.2.4 without SSL support using the binary from apache.org, and now I need to add SSL to the site. I downloaded the SSL-included package from this site and extracted mod_ssl.so to my modules directory, updated extras/httpd-ssl.conf appropriately, included it and told Apache to load modules/mod_ssl.so, but when I try to restart Apache it says modules/mod_ssl.so could not be found.

How do I add SSL to my non-SSL Apache installation?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Fri 16 Mar '07 20:19    Post subject: Re: How do I add SSL to a non-SSL apache build? Reply with quote

DiMono wrote:
... and extracted mod_ssl.so to my modules directory ...
Only to copy is not enough. Best is to copy the .zip over and do not forget to install Visual C++ 2005 Redistributable Package as described in the readme.

Steffen
Back to top
DiMono



Joined: 16 Mar 2007
Posts: 5
Location: Just north of Toronto

PostPosted: Fri 16 Mar '07 20:32    Post subject: Reply with quote

I believe you misunderstand me. I don't want to install Apache freshly or re-install it, I already have Apache installed without SSL support, and I want to add SSL to it. Can it be done?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Fri 16 Mar '07 20:43    Post subject: Reply with quote

The apache you run is not build with SSL support.

It is not re-installing but overwriting and adding files.
Btw. you do not have to copy your conf folder over.
Back to top
DiMono



Joined: 16 Mar 2007
Posts: 5
Location: Just north of Toronto

PostPosted: Fri 16 Mar '07 20:53    Post subject: Reply with quote

Alright, okay, is there a how-to in the readme docs included in your download that can walk me through which files to overwrite and add, and how to do it safely? Or do I just follow the directions for doing it normally and then copy everything except the conf directory to my current build?
Back to top
DiMono



Joined: 16 Mar 2007
Posts: 5
Location: Just north of Toronto

PostPosted: Fri 16 Mar '07 22:15    Post subject: Reply with quote

So now I have two Apache services, and I'm getting an error about my SSLSessionCache, which has dbm:path/to/file as the argument, not having dbm:path/to/file as the argument. Help?

Edit: Solved that, it had to do with the absolute pathname. Now I'm getting this error:

Quote:
[error] Init: SSLPassPhraseDialog builtin is not supported on Win32 (key file C:/Program Files/Apache Software Foundation/Apache2.2/conf/ssl/www.domain.com.key)
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Fri 16 Mar '07 22:29    Post subject: Reply with quote

Unfortunately Apache on Windows does not support encrypted private keys. To resolve this you will need to remove the private key password.


Have a look at http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html at the heading "How can I get rid of the pass-phrase dialog at Apache startup time?" Try the steps to remove the passphrase from your private key.


Steffen
Back to top
DiMono



Joined: 16 Mar 2007
Posts: 5
Location: Just north of Toronto

PostPosted: Fri 16 Mar '07 22:37    Post subject: Reply with quote

Yep, I'm in like Flynn now. Server is started, and all is right in the world. One problem: I can't get my rewrite to force the https connection. Here's what's in my .htaccess file:

Quote:
RewriteEngine On
RewriteCond %{SERVER_PORT}!443
RewriteRule ^(.*)$ https://www.x.com/dir/$1 [R,L]


Of course, if Windows Apache doesn't check for .htaccess that's a very clear reason why it's not working. My DirectoryIndex directive is also being ignored, so I'm thinking that may be the case. Is there something I can update in my httpd.conf file?
Back to top


Reply to topic   Topic: How do I add SSL to a non-SSL apache build? View previous topic :: View next topic
Post new topic   Forum Index -> Apache