File: //etc/apache2/sites-enabled/ruby.ru.ac.ke.conf
<VirtualHost *:80>
ServerAdmin webmaster@ru.ac.ke
ServerName ruby.ru.ac.ke
DocumentRoot /var/www/ruby
ErrorLog ${APACHE_LOG_DIR}/ruby_error.log
CustomLog ${APACHE_LOG_DIR}/ruby_access.log combined
<Directory /var/www/ruby>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =ruby.ru.ac.ke
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>