<VirtualHost *:80>
ServerName lists.scummvm.org
Redirect permanent / https://lists.scummvm.org/
RewriteEngine on
RewriteCond %{SERVER_NAME} =lists.scummvm.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
ServerName lists.scummvm.org
DocumentRoot /var/www/lists

ErrorLog ${APACHE_LOG_DIR}/lists_error.log
CustomLog ${APACHE_LOG_DIR}/lists_access.log combined

# ---- MAILMAN SETUP ----
# -----------------------

Alias /robots.txt /var/www/lists/robots.txt

<Directory /var/lib/mailman/archives/>
  Options FollowSymLinks Indexes
  AllowOverride None
</Directory>

<Directory /usr/lib/cgi-bin/mailman/>
    AllowOverride None
    Options ExecCGI
    AddHandler cgi-script .cgi
    Require all granted
</Directory>
<Directory /var/lib/mailman/archives/public/>
    Options FollowSymlinks Indexes
    AllowOverride None
    Require all granted
</Directory>
<Directory /usr/share/images/mailman/>
    AllowOverride None
    Require all granted
</Directory>

Alias /pipermail /var/lib/mailman/archives/public/
Alias /images/mailman/ /usr/share/images/mailman/
ScriptAlias /admin /usr/lib/cgi-bin/mailman/admin
ScriptAlias /admindb /usr/lib/cgi-bin/mailman/admindb
ScriptAlias /confirm /usr/lib/cgi-bin/mailman/confirm
ScriptAlias /create /usr/lib/cgi-bin/mailman/create
ScriptAlias /edithtml /usr/lib/cgi-bin/mailman/edithtml
ScriptAlias /listinfo /usr/lib/cgi-bin/mailman/listinfo
ScriptAlias /options /usr/lib/cgi-bin/mailman/options
ScriptAlias /private /usr/lib/cgi-bin/mailman/private
ScriptAlias /rmlist /usr/lib/cgi-bin/mailman/rmlist
ScriptAlias /roster /usr/lib/cgi-bin/mailman/roster
ScriptAlias /subscribe /usr/lib/cgi-bin/mailman/subscribe
ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
ScriptAlias / /usr/lib/cgi-bin/mailman/listinfo

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/scummvm.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/scummvm.org/privkey.pem
</VirtualHost>
