Getting paid internationally?
Choose Payoneer.

Self-Signed Certs for Apache in Debian-based Linux

The following procedure shows how to apply self-signed certificates to the Apache web server in Debian-based Linux distributions.

After creating and installing the TLS/SSL certificate/key pair, they can be utilized to secure Debian-based Linux web services with encryption during the development and testing process. It is important to keep in mind that self-signing may be deemed UNTRUSTWORTHY in a production environment.


1. Go to the directory containing the Apache site configuration files.

user@host: $ cd /etc/apache2/sites-available

2. BACK UP the default HTTPS configuration file for the secure site.

user@host: $ sudo cp default-ssl.conf default-ssl-conf.back

3. Open the default HTTPS configuration file.

user@host: $ sudo nano default-ssl.conf

4. Find and modify the following Apache directives.

# ...

SSLCertificateFile /etc/ssl/certs/myserver.crt
# The self-signed certificate.

SSLCertificateKeyFile /etc/ssl/private/myserver.key
# The key for the self-signed certificate.

# ...

5. Restart the web server.

user@host: $ sudo /etc/init.d/apache2 restart



Getting paid internationally?
Choose Payoneer.

Get started with DigitalOcean SSD Virtual Servers  Email Newsletters & Email Marketing by

Popular posts from this blog

Enabling HTTPS in Home Assistant

Running Home Assistant on FreeBSD Servers

Configuring the FreeBSD Firewall with IPFW