On 06/09/2012 05:59 AM, Peter Humphrey wrote: > On Friday 08 June 2012 22:01:08 Paul Hartman wrote: >> On Fri, Jun 8, 2012 at 1:21 PM, Peter Humphrey > <pe...@humphrey.ukfsn.org> wrote: >>> $ cat .htaccess >>> RewriteEngine on >>> >>> RewriteCond %{HTTP_REFERER} !^http://tideswellmvc.co.uk/.*$ >>> [NC] RewriteCond %{HTTP_REFERER} !^http://tideswellmvc.co.uk$ >>> [NC] RewriteCond %{HTTP_REFERER} >>> !^http://www.tideswellmvc.co.uk/.*$ [NC] >>> RewriteCond %{HTTP_REFERER} !^http://www.tideswellmvc.co.uk$ >>> [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC] >>> >>> Options +Includes >> >> I suspect this particular error ("Options not allowed here") is >> because this .htaccess is running in a user home directory, and >> Options +Includes can't be set by a user. You may need to declare >> that in your apache httpd.conf "Directory" section for that path, >> rather than in the .htaccess file. > > Hmm. Sounds plausible. Maybe I'll have to put it back into /var/www/... > and try to work out why I can't see images there. > > Thanks for your help Paul. >
If you want to allow overrides in an htaccess, you'll need at least, <Directory "/var/www/whatever"> Options +SymLinksIfOwnerMatch AllowOverride FileInfo Options </Directory> in the main config or your vhost config. The Gentoo config modularizes by default, but you don't have to use it if you don't want to. Almost everything under /etc/apache2/modules.d is disabled by default unless you enable it in /etc/conf.d/apache2. Named virtual hosts are also disabled by default if I remember correctly, so you should be able to just stick stuff in httpd.conf or 00_default_settings.conf and have it take effect if you don't want to do anything fancy. Almost everything "different" about the Gentoo config comes from these two lines at the bottom of httpd.conf: Include /etc/apache2/modules.d/*.conf Include /etc/apache2/vhosts.d/*.conf which do exactly what you'd expect.