Slackware HowTo

Enable HTTPS in Apache with a self-signed certificate on Slackware

Prepare a local or internal SSL VirtualHost with keys, certificate, and quick tests.

1. Goal

Prepare a local or internal SSL VirtualHost with keys, certificate, and quick tests.

2. Files and components involved

/etc/httpd/httpd.conf
/etc/httpd/ssl/server.key
/etc/httpd/ssl/server.crt
/etc/httpd/extra/httpd-ssl.conf

3. Operational flow

mkdir -p /etc/httpd/ssl
generate certificate with openssl req
configure VirtualHost 443
restart httpd

4. Operational verification

apachectl -t
ss -lntup
grep 443
curl -kI https://127.0.0.1/

5. Practical notes

Test the configuration with a file separate from the real site and keep a copy of the previous config.

After changing the configuration, always run a syntax test and open the page from a browser or with curl on localhost.

Quick checklist

[ ] Backup or copy of the existing configuration completed
[ ] Files and commands updated as expected
[ ] Local test completed successfully
[ ] Logs or final output verified
[ ] Rollback procedure documented

Back to the Linux HowTo section