"oh no!" warning, but everything works fine... should I bother?

gian

Joined: 2011-09-20
Posts: 69
Posted: Sat, 2011-10-08 18:35

Hello All,

this seems paranoid, but I am trying to learn something.

I have the dreaded "oh no!" message in album permissions, *but* everything works fine, with no errors in Apache log. So, should I bother?

There are two entries for AllowOverride in my virtualhost conf file:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.myownwebserver.net
ServerAlias myownwebserver.net
DocumentRoot /var/www/gallery3

<Directory />
Options FollowSymLinks
AllowOverride Limit
</Directory>

<Directory /var/www/gallery3>
AllowOverride None
Options -Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from all
</Directory>

The first AllowOverride Limit comes from this instruction in Gallery3 htaccess:

# Increase security by uncommenting this block. It keeps browsers
# from seeing support files that they shouldn't have access to. We
# comment this out because Apache2 requires some minor configuration
# in order for you to use it. You must specify "AllowOverride Limit"
# in your Apache2 config file before you uncomment this block or
# you'll get an "Internal Server Error".
#
<FilesMatch "(\.(class|fla|gitignore|inc|ini|sql|txt)|(README|LICENSE|.build_n$
Order deny,allow
Deny from all
</FilesMatch>

<FilesMatch "robots.txt">
Order allow,deny
Allow from all
</FilesMatch>

If I change the second AllowOverride None to AllowOverride FileInfo Options to remove the "oh no!" warning, I get error 500.

Should I pretend not to see "Oh no!" and live happily ever after?

My guess is that having AllowOvverride None in /var/www/gallery3 the .htaccess is ignored, which makes me uncomfortable...

thanks for reading,
-Gian

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2011-10-09 03:35
Quote:
If I change the second AllowOverride None to AllowOverride FileInfo Options to remove the "oh no!" warning, I get error 500.

Should I pretend not to see "Oh no!" and live happily ever after?

Check your server's error logs about the 500 error

____________________________________________
Like Gallery? Like the support? Donate now!

 
gian

Joined: 2011-09-20
Posts: 69
Posted: Sun, 2011-10-09 05:26

added FileInfo Options to second AllowOverride, restarted Apache, opened website, got error 500, here is error-log:
[Sun Oct 09 07:21:45 2011] [alert] [client 88.149.xxx.yyy] /var/www/gallery3/.htaccess: order not allowed here
[Sun Oct 09 07:21:48 2011] [alert] [client 88.149.xxx.yyy] /var/www/gallery3/.htaccess: order not allowed here

-G

 
gian

Joined: 2011-09-20
Posts: 69
Posted: Mon, 2011-10-10 20:47

So! I am exhausted, but I got it.

Note: this issue is related to the way Debian/Ubuntu distros setup Virtualhosts.

I got the hint from this doc:
http://drupal.org/node/43783
where it says:

# Modify the RewriteBase if you are using Drupal in a subdirectory and the
# rewrite rules are not working properly:
RewriteBase /drupal
......
This is because the debian package installs the drupal "sites-enabled" virtual host, result being that drupal is accessed from http://example.com/drupal, hence the need to uncomment RewriteBase. Change it to the base that corresponds to your system.

ref: http://www.debian-administration.org/articles/136
http://drupal.org/node/14322

So, I changed RewriteBase in gallery3/.htaccess from /gallery3 to /, and this fixed all errors.

I hope this can save some time to other users.

good night!
-G