I have been trying to learn how to set up SSL with apache 2.0 on Windows with mod_ssl, I made sure the mod_ssl.so file is in the module directory and the configuration file is included in the conf directory (httpd-ssl.conf), enabled the module by un-commenting the LoadModule option for mod_ssl.so.
I created a self signed certificate and placed both the crt file and key file in the conf directory.
The information on my ssl config file looks as follows:
<VirtualHost _default_:443> ServerAdmin email@example.com DocumentRoot "D:/Dev-Ops/apache/Apache2/htdocs/secure/" ServerName localhost:443 ServerAlias localhost:443 SSLEngine on SSLEnable SSLCertificateFile "D:/Dev-Ops/apache/Apache2/conf/server.cert" SSLCertificate "D:/Dev-Ops/apache/Apache2/conf/server.key" </VirtualHost>
I am sure I might be doing something wrong here (I am a newbie to Apache and all these things). Currently I get an error saying:
Syntax error on line 8 of D:/Dev-Ops/apache/Apache2/conf/httpd-ssl.conf: Invalid command 'SSLEnable', perhaps mis-spelled or defined by a module not included in the server configuration
My questions are :
Do I have to have OpenSSL installed (I already have it installed) on my computer in-order for mod_ssl to work ? If so is there something I need to configure to make sure they both communicate to each other ?
What is wrong with the above VirtualHost configuration ? and what can I do to get it right?
Does every version of apache has to have a specific version of mod_ssl? if so where can I get the binary mod_ssl.so file to download from (it is pretty hectic to find this tiny file! or is me looking at the wrong places!), if it does have to have a specific version of mod_ssl, what would be the best version for Apache 2.0?
What is causing the error that I mentioned above ? (I made sure my files are in the right place all the configuration directives are enabled, etc.).
Please can you suggest a good place/book/link for me to start learning more about apache web server and its various applications in production environments?
Please can someone help me soon? All your help will be very much appreciated.
I stripped out the virtual host to the following:
<VirtualHost _default_:443> DocumentRoot "D:/Dev-Ops/apache/Apache2/htdocs/secure/" SSLCertificateFile "D:/Dev-Ops/apache/Apache2/conf/server.cert" SSLCACertificatePath "D:/Dev-Ops/apache/Apache2/conf/" </VirtualHost>
and I get the following error displayed on browser:
When I try the same with the following configuration directives (With SSLEngine on)
<VirtualHost _default_:443> DocumentRoot "D:/Dev-Ops/apache/Apache2/htdocs/secure/" SSLEngine on SSLCertificateFile "D:/Dev-Ops/apache/Apache2/conf/server.cert" SSLCACertificatePath "D:/Dev-Ops/apache/Apache2/conf/" </VirtualHost>
I am getting the following error at the error.log file:
[error] Init: SSLPassPhraseDialog builtin is not supported on Win32 (key file D:/Dev-Ops/apache/Apache2/conf/server.cert)
I have done fair bit of research on removing the pass-phrase and regenerating certificate, replacing the existing one with thee newly produced one; however that doesn't seem to do the trick for me! I am beginning to wonder whether it is the version of my mod-ssl that is the problem (how can/where can I find whether it is compatible with the version of my apache! and if it is not compatible where can I obtain the .so file to get things right!)
Please can someone explain this to me? and help me resolve this issue!