Page MenuHomePhabricator

Enable Short URLs within Docker container?
Closed, ResolvedPublic

Description

I was thinking about https://github.com/wikimedia/mediawiki-docker/pull/51 and I was wondering if perhaps we should add short url support within the container:

Maybe by adding something like this?

# Enable Short URLs
RUN a2enmod rewrite \
  && { \
      echo '<Directory /var/www/html>'; \
      echo '  RewriteEngine On'; \
      echo '  RewriteCond %{REQUEST_FILENAME} !-f'; \
      echo '  RewriteCond %{REQUEST_FILENAME} !-d'; \
      echo '  RewriteRule ^ %{DOCUMENT_ROOT}/index.php [L]'; \
      echo '</Directory>'; \
    } > "$APACHE_CONFDIR/conf-available/short-url.conf" \
  && a2enconf short-url

It would give a nice default configuration and allow people to disable it if they don't want it.

What do you think?