One culprit of activating mod_rewrite

I’m in the process of installing Gallery to share my pictures and possibly other media files with friends, family and anonymous internet visitors like you :) There’s one plugin rewrite in Gallery to produce short and readable URLs that requires Apaches mod_rewrite to be active. Only after I figured it out myself, I also found some documentation on it: I knew that the apache module is loaded, but still the Gallery plugin would not work. That was because there was another setting for Apache missing:

<Directory /full/path/to/gallery2>    AllowOverride FileInfo Options

</Directory>

I had to do this in two places in /etc/apache/extras/apache-vhosts.conf:

  <VirtualHost *:80>    <Directory /export/http/bilder>
      [...]
      AllowOverride FileInfo Options    </Directory>  </VirtualHost>

<VirtualHost _default_:80>

<Directory /export/http/bilder>
      [...]
      AllowOverride FileInfo Options    </Directory>
  </VirtualHost>

Notes to self:

  •  Pay attention to details - I skipped the tiny blue question mark next to Gallery’s plugin name that linked right to the documentation with troubleshooting.
  • Accept that some things look simple but still require hours of work to get it working.

Update 2008-05-18: This worked fine as long as the apache configuration files remained as that. Unfortunatly they were overridden, when I updated my Linux distro (CBS). But getting it working again was really simple, and also would have saved me all the effort earlier: In CBS you can set some options for the share and virtual hosts, and one of the options is to allow the usage of .htaccess files. Gallery comes with it’s own configuration files, and once this option was turned on, everything worked :)

Tags: , ,

Leave a Reply