Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Install Apache 2 with SSL On Debian based Linux

By editor , 30 October, 2016
Question

How to install apache2 with SSL on On Debian based Linux ?

Install Apache following this tutorial

Activate SSL Module

sudo a2enmod ssl
sudo service apache2 force-reload
#Or sudo /etc/init.d/apache2 force-reload

Create Certificate

Install SSL packages
sudo apt-get install ssl-cert

Create self signed certification (Or you can also use Let's Encrypt)
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/private/localhost.pem
sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -out /etc/apache2/server.crt -keyout /etc/apache2/server.key
sudo chmod o-rw /etc/apache2/server.key

 

Configure Apache


Methode 1
cd /etc/apache2/sites-available/
sudo cp default-ssl ssl
sudo sed -i '1,2s/\*:80/*:443/' ssl
sudo sed -i "3a\\\tSSLEngine On\n\tSSLCertificateFile /etc/ssl/private/localhost.pem" ssl

Activate the ssl site
sudo a2ensite ssl

 

Methode 2

Edit  /etc/apache2/ports.conf and add
Listen 443

Edit your Host/VirtualHost file and add
<VirtualHost 192.168.0.2:443>
    ServerName domainname.com
    DocumentRoot /var/www/domainname

    SSLEngine on
    SSLCertificateFile /etc/apache2/server.crt
    SSLCertificateKeyFile /etc/apache2/server.key
</VirtualHost>

 

Reload apache

sudo service apache2 reload
#Or sudo /etc/init.d/apache2 reload

Tags

  • Server
  • Linux
Install LAMP On Debian based Linux
Download and Install drupal 8/9 - Composer

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer