# /etc/apache2/sites-available/sustcse12.xyz.conf
# Accept non-www or www http request
<VirtualHost *:80>
ServerName www.sustcse12.xyz
ServerAlias sustcse12.xyz
RedirectMatch permanent ^/(.*) https://www.sustcse12.xyz/$1
</VirtualHost>
# /etc/apache2/sites-available/sustcse12.xyz-le-ssl.conf
# Accept non-www https request
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName sustcse12.xyz
RedirectMatch permanent ^/(.*) https://www.sustcse12.xyz/$1
</VirtualHost>
</IfModule>
# Accept https request with www
# Serving Configuration
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName www.sustcse12.xyz
DocumentRoot /var/www/html/sustcse12.xyz/SUST-CSE-12/public
<Directory "/var/www/html/sustcse12.xyz/SUST-CSE-12/public/">
AllowOverride All
</Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/sustcse12.xyz/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/sustcse12.xyz/privkey.pem
</VirtualHost>
</IfModule>