Reading Time: < 1 minute

Last Updates: 2/26/2022. This is still quick and dirty.

We are briefly going to touch on Apache2. And with a little luck sometime I will actually post some text in here.

sudo apt update
sudo apt install apache2

The following can be used to enable a “configuration” file for apache. The files for apache2 are store in /etc/apache2/sites-available A common site configuration file might have the “extension” of “.conf”. a2ensite is smart enough to treat wordpress and wordpress.conf the same.

sudo a2ensite wordpress

To enable the SSL module.

sudo a2enmod ssl

To reload the apache2 service.

sudo service apache2 reload

To disable a site.

sudo a2dissite 000-default

The config to enable SSL might look something like this. This can be added to the end of an existing config. This example is for a site named: wordpress. Please note the placement of the wp.crt and wp-privkey.pem files.

<VirtualHost *:443>
   DocumentRoot /srv/www/wordpress
   SSLEngine on
   SSLProtocol all -SSLv2 -SSLv3 -TLSV1
   SSLCertificateFile /etc/ssl/certs/wp.crt
   SSLCertificateKeyFile /etc/ssl/certs/wp-privkey.pem
   #LCertificateChainFile /var/www/letsencrypt/live/
   <Directory /srv/www/wordpress>
        Options FollowSymLinks
        AllowOverride Limit Options FileInfo
        DirectoryIndex index.php
        Require all granted

Related posts

Linux Ubuntu Distribution Upgrade

Tom Hamilton

Netplan – Networking – Ubuntu

Tom Hamilton

Ubuntu/Linux – Helpful Reminders

Tom Hamilton