<VirtualHost *:80>
    ServerName personal.lencraftserver.de
    Redirect permanent / https://personal.lencraftserver.de/
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName personal.lencraftserver.de
    DocumentRoot /var/www/personal

    ErrorLog ${APACHE_LOG_DIR}/personal-error.log
    CustomLog ${APACHE_LOG_DIR}/personal-access.log combined

    Alias /data "/srv/dev-disk-by-uuid-74d43649-de72-4984-a696-52f22e785af9/Cloud/Lenny Strauhal/Dokumente/public"

    Alias /rep/sound "/srv/dev-disk-by-uuid-549ab06c-f0d2-4dce-b7d2-0d3199bd99b2/Cloud/Lenny Strauhal/Videos/PRE/sounds/sfx"

    Alias /rep/images "/srv/dev-disk-by-uuid-74d43649-de72-4984-a696-52f22e785af9/Cloud/Lenny Strauhal/Bilder/public"

    <Directory "/srv/dev-disk-by-uuid-74d43649-de72-4984-a696-52f22e785af9/Cloud/Lenny Strauhal/Dokumente/public">
        Options -Indexes +FollowSymLinks
        AllowOverride None
        Require all granted
   </Directory>

    <Directory "/srv/dev-disk-by-uuid-74d43649-de72-4984-a696-52f22e785af9/Cloud/Lenny Strauhal/Bilder/public">
        Options -Indexes +FollowSymLinks
        AllowOverride None
        Require all granted
   </Directory>

    <Directory "/srv/dev-disk-by-uuid-549ab06c-f0d2-4dce-b7d2-0d3199bd99b2/Cloud/Lenny Strauhal/Videos/PRE/sounds/sfx">
        Options -Indexes +FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>

    <Directory /var/www/personal>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    RewriteEngine On
    RewriteCond %{QUERY_STRING} (^|&)utm_ [NC]
    RewriteRule ^ - [E=HAS_UTM:1]

    SetEnvIf Request_URI "^/passwords/data/database\.php$" database
    CustomLog /var/log/apache2/utm_access.log combined env=HAS_UTM
    CustomLog /var/log/apache2/database-access.log combined env=database

    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/personal.lencraftserver.de/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/personal.lencraftserver.de/privkey.pem

#    DocumentRoot /var/www/datanet/sources/backend/error	
#    ErrorDocument 404 https://api.datanet.lencraftserver.de/backend/error/index.html
</VirtualHost>
</IfModule>
