<VirtualHost *:80>
ServerName bugs.scummvm.org
Redirect permanent / https://bugs.scummvm.org/
</VirtualHost>

<VirtualHost *:443>
ServerName bugs.scummvm.org
ServerAdmin webmaster@scummvm.org
DocumentRoot /var/www/trac

ErrorLog ${APACHE_LOG_DIR}/bugs_error.log
CustomLog ${APACHE_LOG_DIR}/bugs_access.log combined

# ---- TRAC SETUP ----
# --------------------

FcgidIOTimeout 3600
FcgidMaxRequestLen 2097152
ScriptAlias / /var/www/trac/cgi-bin/trac.fcgi/
DefaultInitEnv /home/trac/trac-env/scummvm

Redirect /login /github/login

<Directory /var/www/trac/htdocs>
  Require all granted
</Directory>

Alias /chrome/common /var/www/trac/htdocs/common
Alias /chrome/site /var/www/trac/htdocs/site

<Directory /var/www/trac/cgi-bin>
  Require all granted
</Directory>

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