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

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

DirectoryIndex index.php
FallbackResource /index.php

ErrorLog ${APACHE_LOG_DIR}/planet_error.log
CustomLog ${APACHE_LOG_DIR}/planet_access.log combined

RewriteEngine on
RewriteCond "%{HTTP_REFERER}" "developers.google.com/season-of-docs/docs/participants"
RewriteRule .* "https://wiki.scummvm.org/index.php?title=Season_of_Docs/GSoD_Ideas"

# ---- PLANET SETUP ----
# ----------------------

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