Enable mod_rewrite for vhost

Problem

Cause

  • The mod_rewrite for this vhost is activated by a custom .htaccess file in the document root of  the vhost.
  • Activation is not possible, because the site configuration for this vhost doesn’t allows it.

Solution

  • Change the appropriate line in the site configuration file for this vhost
  • Restart Webserver

Example

  • vhost is www.foo.private
  • Related conf file is /etc/apache2/sites/000_any_80_www.foo.private.conf
  • Find the line containing “AllowOverride None
  • Change it to “AllowOverride All

Nice to have

  • A global setting for all new vhosts
  • Maybe editing /etc/apache2/httpd.conf would do the trick?

Links