December 21, 2024

In apache_home/bin, run: (openssl comes with Apache)
openssl req -new -x509 -days 3650 -sha1 -newkey rsa:1024 -nodes -subj “/O=Org/OU=Dept/CN=example.com” -keyout ../conf/server.key -out ../conf/server.crt

Make sure the subject is in double quotes or else you’ll get a “Subject does not start with ‘/’.” error message.

Uncomment the following lines in apache_home/conf/httpd.conf:
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf

Modify the settings in apache_home/conf/extra/httpd-ssl.conf if need to change things from the standard install.

Source:
Step by Step: Configuring SSL Under Apache