<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@aiee.eu
ServerName asztronauta.com
ServerAlias www.asztronauta.com
DocumentRoot /home/websites/web/asztronauta.com
<Directory />
AllowOverride All
</Directory>
<Directory /home/websites/web/asztronauta.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/apache2/asztronauta.com-error.log
LogLevel error
CustomLog /var/log/apache2/asztronauta.com-access.log combined
SSLCertificateFile /etc/letsencrypt/live/www.asztronauta.com-0001/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.asztronauta.com-0001/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/www.asztronauta.com-0001/chain.pem
</VirtualHost>
</IfModule>
~
<VirtualHost *:80>
ServerAdmin webmaster@aiee.eu
ServerName asztronauta.com
ServerAlias www.asztronauta.com
DocumentRoot /home/websites/web/asztronauta.com
<Directory />
AllowOverride All
</Directory>
<Directory /home/websites/web/asztronauta.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/apache2/asztronauta.com-error.log
LogLevel error
CustomLog /var/log/apache2/asztronauta.com-access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.asztronauta.com [OR]
RewriteCond %{SERVER_NAME} =asztronauta.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>