<VirtualHost *:80>
ServerAdmin webmaster@{domain}
ServerName {domain}
ServerAlias {sub}.{domain}
DocumentRoot "/var/www/html/{domain}"
DirectoryIndex index.php
<Directory "/var/www/html/{domain}/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{SERVER_NAME} ={domain} [OR]
RewriteCond %{SERVER_NAME} ={sub}.{domain}
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
- Jihad Sinnaour - Jakiboy (Initial work)
Please give it a Star if you like the project.