    <Directory /var/www/dev/pime>
        AllowOverride All
        Options +FollowSymLinks
    </Directory>
<VirtualHost *:80>
        ServerName pime.aplicatiuspin.cat
        ServerAlias pime.spinvilanova.com
        ServerAdmin root
        DocumentRoot /var/www/dev/pime/
        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>

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName pime.aplicatiuspin.cat
        ServerAlias pime.spinvilanova.com
        ServerAdmin root
        DocumentRoot /var/www/dev/pime/
        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/pime.aplicatiuspin.cat/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/pime.aplicatiuspin.cat/privkey.pem
</VirtualHost>
</IfModule>
