You can install OpenSSL for Windows, which is free.
After installation, open command line (
cmd.exe), go to installation directory and run appropriate
openssl.exe req -x509 -newkey rsa:2048 -keyout server.key -out server.crt -days 1000 -nodes
server.key (private key for your Apache) and
server.crt (self-signed certificate). Remember to protect your private key.
For installation to Apache2 (in Linux):
sudo a2enmod ssl
sudo a2ensite default-ssl
Change correct paths to following lines (paths to your new key and certificate):
Save and run
/etc/init.d/apache2 restart (or if your distribution uses some different way, not that command).