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