Apache SSL: Configuring Apache
with mod_ssl
|
|
1. Configuring Apache2 with MOD_SSL. Stop Apache and copy the
exes and dlls from the bin folder in Apache/modssl into the
Apache/Apache2 bin folder. If you may receive a file replacement
message, which is ok. Click Yes to All to continue.
Next paste the mod_ssl file from the modules folder in Apache/modssl
into the modules folder in Apache/Apache2.
Open the httpd.cnf file found in Apache/Apache2/conf and locate the
LoadModule directives, which is found toward the beginning of the file
and uncomment LoadModule ssl_module modules/mod_ssl.so
After the </IfModule> add
SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none
<VirtualHost www.my-domain.com:443>
SSLEngine On
SSLCertificateFile conf/ssl/my-server.cert
SSLCertificateKeyFile conf/ssl/my-server.key
</VirtualHost>
You must edit the domain in the <VirtualHost www.my-domain.com:443> to
be localhost. The line should appear as <VirtualHost localhost:443> Save
the file and exit.
In the httpd.cnf file uncomment line 614, which is Include conf/extra/httpd-ssl.conf,
by removing the #.
Open the httpd-ssl.cnf file found in conf/extras and edit the paths of
your key and certificate. Fine the reference to your SSL certificate,
which is at line 99. Change the location so Apache can find your
certificate. The line should read SSLCertificateKeyFile
C:/Apache/Apache2/conf/ssl/my-server.cert
Then go to line 107 and edit the location of where Apache can find your
key. The line should read SSLCertificateKeyFile C:/Apache/Apache2/conf/ssl/my-server.key.
Save the file and exit.
Open a command window and navigate to Apache/Apache2/bin and enter
httpd.exe. This will start Apache using the SSL modifications. If there
is an error with the httpd.cnf or httpd-ssl.cnf file you will get an
error message. If you attempt to start Apache through the Apache Monitor
and there is an error you will not receive a message other then Apache
could not start. To close Apache in the command window press ctrl + c
and restart Apache using the monitor.
Open a browser and navigate to http://locatlhost and https://localhost
to ensure that your server is working correctly.

 |
|
 |
|