    <Directory /var/www/dev/spinpime>
        AllowOverride All
        Options +FollowSymLinks
    </Directory>
<VirtualHost *:80>
        ServerName spinpime.aplicatiuspin.cat
        ServerAlias spinpime.cat
        ServerAdmin root
        DocumentRoot /var/www/dev/spinpime/
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<Directory /var/www/dev/spinpime>
        AllowOverride All
        Options +FollowSymLinks
    </Directory>
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName spinpime.aplicatiuspin.cat
        ServerAlias spinpime.cat
        ServerAdmin root
        DocumentRoot /var/www/dev/spinpime/
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]


Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/spinpime.aplicatiuspin.cat/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/spinpime.aplicatiuspin.cat/privkey.pem
</VirtualHost>
</IfModule>
