RewriteEngine On

<VirtualHost *:80>
  ServerName moderation.example.com

  DocumentRoot %TRAVIS_BUILD_DIR%

  <Directory "%TRAVIS_BUILD_DIR%/">
    Options FollowSymLinks MultiViews ExecCGI
    AllowOverride All
    Require all granted
  </Directory>

  # Wire up Apache to use Travis CI's php-fpm.
    AddHandler php7-fcgi .php
    Action php7-fcgi /php7-fcgi
    Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi
    FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -host 127.0.0.1:9000 -pass-header Authorization

    <Directory /usr/lib/cgi-bin>
        Require all granted
    </Directory>

  RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]

</VirtualHost>
