How to Setup Free SSL Certificate for Apache on Debian 10

Chưa phân loại
TLS and SSL protocols encrypt the traffic between a website (or other service) and a visitor or web browser preventing sniffers or attackers from accessing the communication. Lately Google demanded all webmasters to use SSL, even for websites without sensitive information exchange turning this protocol in a must independently of the security need.

This tutorial focuses on installing a SSL Certificate on an Apache web server under Linux Debian 10 Buster fast and simple  using Certbot. For users who need an encrypted web server but haven’t installed or configured Apache yet, the first section shows how to install and configure Apache on Debian 10 Buster to host a website.

All steps described in this tutorial are useful for recent previous versions of Debian and based Linux distributions. If you have Apache already you can jump to How to Setup Free SSL Certificate for Apache on Debian 10 Buster.

Installing Apache on Debian 10 Buster

This step is only for users who didn’t install Apache yet, if you already have Apache installed jump to the chapter “How to Setup Free SSL Certificate for Apache on Debian 10”.
If you have not Apache installed, install it  by executing:

# apt install apache2 -y

Once installed the service will automatically start and you’ll be able to access your web server from your browser through  the address (localhost).

Apache supports multiple domains too, but for this setup we will only configure the domain using the default configuration file for apache /etc/apache2/sites-enabled/000-default.conf. Run:

# nano /etc/apache2/sites-enabled/000-default.conf

The uncommented lines below show a proper configuration adapted for,

The file contains the following content opening the file (<VirtualHost *:80>), the server name, alias, contact information, root directory, logging files information and closing file (</VirtualHost>).

<VirtualHost *:80>
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

You can rename Apache’s default index page by running:

# mv index.html oldindex.html

Then create a new page for testing purposes:

# nano test.html

Put inside any content you want:

Press CTRL+X to save and exit.

In order to allow access from outside the network, some home users will need to configure their routers to forward necessary ports to their web servers. The following image only shows an example of router configuration page for port forwarding, in your router you’ll need to forward ports 80 and 443 to your Apache computer local IP address.

Finally you will be able to access your website from outside your network.

How to Setup Free SSL Certificate for Apache on Debian 10 Buster

If you already have Apache its time to add SSL, for this purpose this tutorial shows how to install a SSL certificate in a fast and simple way using certbot, an automatic installer and configurer for Let’s Encrypt ssl certificates.

To begin install Certbot packages by running:

# apt install certbot python-certbot-apache -y

Once installed the previous packages create and instruct a redirection to https by running:

# certbot –apache

Fill the requested information:

At some point it will offer you to redirect traffic to https, press 2 to accept, then press ENTER to finish.

If the process success you’ll see the following screen:

Finally you can test your website, press CTRL+F5 and it will redirect through SSL now.

To renew the certificate run:

# certbot renew –dry-run

Conclusion on Certbot method to install a SSL certificate for Apache on Debian 10 Buster

Certbot makes installing SSL certificates extremely easy and fast allowing any inexperienced user without Plesk or Cpanel to share web content in a secure way for free. The whole process took minutes including the Apache installation.

Other free options to get free SSL certificates may include SSL for Free (, the short Comodo free SSL licences or Zerossl which I didn’t try yet, but none of them means a fast and easy method like this one.

I hope you found this brief article on How to Setup Free Certificate for Apache on Debian 10 useful, thank you for reading it.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Using Mytop to Monitor MySQL Performance

Today, one of the most critical parts of any application is how the databases which power the backend of the applications...

How to Redirect URLs in Nginx

Nginx is a lightweight web server, which is often used as a reverse proxy, web server, and a load balancer as well. Nginx,...

Red Hat Vs Ubuntu

Red Hat and Ubuntu are two big names in the Linux world. While both of these distributions of Linux come from different backgrounds,...
Bài Viết

Bài Viết Mới Cập Nhật

Cách gắn set proxy cho điện thoại android, oppo, giả lập android, Ldplayer Bằng Proxydroid

Mua Proxy Socks5 VN Chơi Game Gia Lập Tăng Cường Trải Nghiệm Chơi Game

Mua Proxy Mỹ, Us Nuôi Tài Khoản Etsy, eBay Tìm Hiểu Về Mua Proxy Mỹ tại

Mua Proxy Game – Giải pháp tuyệt vời cho việc chơi game trên mạng mà không bị giới hạn về vị trí địa lý

Sử dụng Proxy để Quản Lý Tài Khoản Quảng Cáo Ads Một Cách An Toàn