Age of Reason

Random musing of books and stuff I am reading.


How to install Apache with SSL on a windows box.

Here is how I installed Apache with SSL on a Windows box

1. Read this HowTo and wiki.

2. You need to download apache 1.3 or 2.0 web-server msi installer
and install in c:/apache (call it $apache).

3. Download ssleay32.dll and libeay32.dlls into %WINDIR%/system32

4. Make certificates with openssl.exe and put them in $apache/conf/ssl/

> openssl req -new -out server.csr
> openssl rsa -in privkey.pem -out server.key
> openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 36500
> openssl x509 -in server.crt -out server.der.crt -outform DER
> cp server.crt server.key $apache/conf/ssl

5. wget and edit conf/ssl/ssl.conf

6. Edit conf/http.conf

7. Test with Opera https://localhost
Opera will ask you about accepting the your server certificate,
the one you created in step 4.
Problems? Debug with wget -d https://localhost and see $apache/logs/*.*

8. How to selectively export directories to a $USER?

Create an account for the USER
> $apache/bin/htpasswd.exe -c $apache/conf/userlist.lst $USER

And export c:/ as https://localhost/exported/c/
Add this to $apache/conf/httpd.conf

LoadModule ssl_module modules/
ServerSignature Off
SSLCertificateFile conf/ssl/server.crt
SSLCertificateKeyFile conf/ssl/server.key

Alias "/exported/c/" "c:/"
< Directory "c:/">
AllowOverride AuthConfig
Options Indexes FollowSymLinks MultiViews
AuthType Basic
AuthName "Password Required"
AuthUserFile abs_path_to_$apache/conf/userlist.lst
Require valid-user
SSLOptions +StrictRequire
< /Directory>


Post a Comment

<< Home